Hi,
The JTAG-based FLASHing is done by the OpenOCD tool, so it would be possible to launch it manually and issue the FLASHing commands manually as well.
You can find out the command line used by VisualGDB to launch OpenOCD in the Debug->Windows->GDB Stub window and then use the GDB Session window (switch it to “All Output” and search for command starting with “mon” to see the commands sent by VisualGDB to OpenOCD to program the FLASH memory).
If you don’t want to setup the command lines and FLASHing commands manually, please try using the Debug->Program FLASH Memory command in Visual Studio that will automatically launch the necessary tools, program the memory and then disconnect the debug session.