久久久久久久视色,久久电影免费精品,中文亚洲欧美乱码在线观看,在线免费播放AV片

<center id="vfaef"><input id="vfaef"><table id="vfaef"></table></input></center>

    <p id="vfaef"><kbd id="vfaef"></kbd></p>

    
    
    <pre id="vfaef"><u id="vfaef"></u></pre>

      <thead id="vfaef"><input id="vfaef"></input></thead>

    1. 站長資訊網(wǎng)
      最全最豐富的資訊網(wǎng)站

      vscode不能命中斷點如何解決

      vscode不能命中斷點如何解決

      vscode不能命中斷點如何解決?

      vscode c++ 編譯生成后,調(diào)試時無法命中斷點的解決辦法

      //test.cpp #include <stdio.h> int g_var = 0; void print_line(char *str) {     if (str != NULL)         printf("%srn", str);     else         printf("null stringrn"); } int main (int argc, char **argv) {     int l_var = 1;     print_line("hello world!");     printf("g_var = %d, l_var = %d.rn", g_var, l_var);     return 0; }

      launch.json

      {         "version": "0.2.0",         "configurations": [             {                 "name": "(gdb) Launch",                 "type": "cppdbg",                 "request": "launch",                 "program": "${workspaceRoot}/test.exe",                 "args": [],                 "stopAtEntry": false,                 "cwd": "${workspaceRoot}",                 "environment": [],                 "externalConsole": true,                 "MIMode": "gdb",                 "miDebuggerPath": "C:\MinGW\bin\gdb.exe",                 "setupCommands": [                     {                         "description": "Enable pretty-printing for gdb",                         "text": "-enable-pretty-printing",                         "ignoreFailures": true                     }                 ]             }         ]     }

      tasks.json

      {     // See https://go.microsoft.com/fwlink/?LinkId=733558     // for the documentation about the tasks.json format     "version": "2.0.0",     "tasks": [         {             "taskName": "test",             "type": "shell",             "command": "g++",             "args": ["-g", "${file}", "-o", "${workspaceRoot}/test.exe"]         }     ] }

      編譯成功后,在源碼中設(shè)置斷點,卻無法命中斷點。

      后來查看官方c++編譯調(diào)試文檔和嘗試,在launch.json文件的

      "setupCommands": [ { "description": "Enable pretty-printing for gdb", "text": "-enable-pretty-printing", "ignoreFailures": true } ]

      后面加上

      "preLaunchTask": "test" 配置,調(diào)試時就可以正常命中斷點了。

      注意:別忘了"setupCommands"的中括號’ ] ‘后面加上一個逗號。

      贊(0)
      分享到: 更多 (0)
      網(wǎng)站地圖   滬ICP備18035694號-2    滬公網(wǎng)安備31011702889846號