Home > Back-end >  Bosses, turn to for help, not vscode debugging..
Bosses, turn to for help, not vscode debugging..

Time:03-03


Variable track not to, and no way to step through such as
Here is my launch. Json and tasks. Json

//https://github.com/Microsoft/vscode-cpptools/blob/master/launch.md
{
"Version" : "0.2.0,"
"Configurations:" [

{
"Name" : "(GDB) Launch",//configuration name, will be in the Launch configuration drop-down menu shown in
"Type" : "CPPDBG",//configuration type, the corresponding cpptools CPPDBG provide debugging function; Can think here can only be CPPDBG
"Request" : "launch",//request configuration type, to launch (start) or the attach (additional)
"The program" : "${fileDirname}/${fileBasenameNoExtension}. Exe",//to debug program path
"Args" : [],//program debugging when passed to the command line arguments, can be sent to
is set to null"StopAtEntry" : false,//set to true when the program will be suspended at the entrance to the program, equivalent to a breakpoint on the main
"CWD" : "${workspaceFolder}",//debug program working directory, this is the workspace folder; Can be turned into file directory to ${fileDirname}
"The environment" : [],//environment variable
"ExternalConsole" : false,//to true when using separate CMD window, in line with other IDE; After October 18 years is set to false can invoke the VSC built-in terminal
"InternalConsoleOptions" : "neverOpen",//if not set as neverOpen, debugging will jump to "debug console" TAB, you should not need to lose command GDB manual?
"MIMode" : "the GDB,//specifies the debugger, connection to the GDB or LLDB, but I didn't try LLDB
"MiDebuggerPath" : "the GDB. Exe",//debugger path under Windows suffixes can't omit, under Linux is not
"SetupCommands" : [
{//template with, if can better display the content of the STL containers, specific role to Google
"Description" : "Enable pretty - printing for GDB",
"Text", "- the enable - pretty - printing",
"IgnoreFailures" : false
}
],
"PreLaunchTask" : "Compile"//debug session prior to the start of the task, generally for the compiler, and the tasks. The json label corresponding to the
}]
}



//https://code.visualstudio.com/docs/editor/tasks
{
"Version" : "2.0.0,"
"Tasks" : [{
"Label" : "Compile",//the name of the task, and launch. Json preLaunchTask corresponding
"Command", "g + +",//to use the compiler, using g + + c + +
"Args" : [
"${file}",
"O",//the specified output file name, without this parameter is the default output a.e xe, under Linux the default a.out
"${fileDirname}/${fileBasenameNoExtension} the. Exe",
"G",//generation and debugging information
"Hunt",//open additional warning
"- static - libgcc",//static link libgcc, usually add
"- fexec - charset=GBK",//use GBK code generated by the program, do not add the output under a leads to Win Chinese garbled
//"- STD=c11",//the latest standards for c + + c + + 17, or according to your own need to change
],//compile command, in fact is equal to the VSC lost these things help you in the terminal
"Type" : "the process",//VSC is process all the predefined variables and escape parsed directly to command; The shell is equal to the first open the shell type the command again, so the args will parse through the shell again
"Group" : {
"Kind" : "build,"
"IsDefault" : true//not to true CTRL shift B will manually choose
},
"The presentation" : {
"Echo" : true,
"Pass reveal" : "always",//when the mission is to jump to end panel, for always, silent, never, specific see VSC document
"Focus" : false,//set to true after can make focused on terminal when performing a task, but for compilation of C/C + +, is set to true meaningless
"Panel" : "Shared"//different file to compile information sharing a terminal panel
},
//"problemMatcher" : "$GCC"//this option can capture compile-time error message in the terminal; But because of Lint, it again this may be a double error
}]
}
I wonder if bosses can help the

CodePudding user response:

this I no initial value?

CodePudding user response:

Should not be the problem,,

CodePudding user response:

Try: https://www.cnblogs.com/qingnvsue/p/12977948.html