I would like to report a bug of CubeMX.
I did generated simple project for STM32F103VEx. Project if fairly simple just uses USB in CDC mode.
I did generate similar project for same processor but only SPI3 using shared pins PB3 and PB4 with JTAG.
Each time while I did generated those projects CubeMX forces to distable whole debug communication JTAG +SWD
by adding line
/**DISABLE: JTAG-DP Disabled and SW-DP Disabled
While SWD could be turned on since it does not conflicts with any of those peripherals. STM32 have options to disable only JTAG or either distable only NRJST pin in JTAG. Why CubeMX forces to kill all of the debug communication ?
Simple project attached. Example file located in testCDC/stm32f1xx_hal_msp.c function void HAL_MspInit(void)