Debug session Attach mode or Launch mode

Hi

When we start debugging in Keil Studio, we press the "Load & Debug application" button.

At this time, it randomly launches either "Debug session started: Launch mode" or "Debug session started: Attach mode."

I would like it to always launch in Launch mode.

What should I do?

In Launch mode, the watch window displays in hexadecimal.

Parents
  • Hi Asuna,

    When you click "Load & Run Application", the image is downloaded to the target device and the GDB server is started at the same time. You will notice that the "Load & Debug Application" icon changes to "Attach Debugger". In other words, the CMSIS-DAP (attach) configuration in launch.json is invoked, which corresponds to what you are seeing as Attach mode.

    On the other hand, if you directly click "Load & Debug Application", the image is downloaded and the debugger session is launched immediately. In this case, the CMSIS-DAP (launch) configuration in launch.json is used.

    In practice, there is usually no functional difference between these two methods.

    Additionally, if you add "set output-radix 16to the CMSIS-DAP (attach) configuration, both methods above will display values in hexadecimal format.

    Refers to Keil Studio Action buttons.

Reply
  • Hi Asuna,

    When you click "Load & Run Application", the image is downloaded to the target device and the GDB server is started at the same time. You will notice that the "Load & Debug Application" icon changes to "Attach Debugger". In other words, the CMSIS-DAP (attach) configuration in launch.json is invoked, which corresponds to what you are seeing as Attach mode.

    On the other hand, if you directly click "Load & Debug Application", the image is downloaded and the debugger session is launched immediately. In this case, the CMSIS-DAP (launch) configuration in launch.json is used.

    In practice, there is usually no functional difference between these two methods.

    Additionally, if you add "set output-radix 16to the CMSIS-DAP (attach) configuration, both methods above will display values in hexadecimal format.

    Refers to Keil Studio Action buttons.

Children
No data