I have an error typing in Visual Studio Code. The cursor is thickened and does not let me write / edit the code. I already uninstalled and reinstalled. Of course I press insert and it's fixed, but after a very short time, it's the same again. An inconvenience since every time I have to do something, I have to press insert first. I also tried from the cursor configuration, but it does not solve it. I tried the solutions offered in the answers to another person who generated this query but they did not work for me.
I hope my question is understood.
Thank you!
I am working with Visual Studio Code 2019 on Ubuntu/Windows. Is there a keyboard shortcut or some command to list all the methods or functions of the current file?
I compile a program with gcc
. From VSCode
I open a font file, and I set a breakpoint.
Next, on the target machine, I launch the gdbserver
with the appropriate arguments. The debugger runs and waits for connections.
From VSCode
the debug view, I launch remote debugging. All correct, it connects to the gdbserver
.
As soon as the breakpoint is hit, the source file is closed , and the VSCode
displays the window with the warning:
Cannot open
nombre-del-archivo
: File not found (file:///full/path/to/the/file)
I'm building from a VM, where the project directory is correctly shared between Windows (host) and Linux (guest). From Linux, the shared folder (as shown in the image) is /media/sf_D_Drive
.
Of course, the file that supposedly doesn't exist is present:
How VSCode
do I get the source file to not close, or show the error window, when I reach the breakpoint?
EDIT
I just realized the problem: I compile from the VM, but VSCode
I'm running it from the host machine; the executable has the paths relative to the VM, while the paths on Windows (host) are different.
Path on Linux:/media/sf_D_DRIVE/CMS/Subversion/CORE_5G/src/com
Path on Windows:D:\CMS\Subversion\CORE_5G\src\com
File .vscode\launch.json
:
{
"version": "0.2.0",
"configurations": [
{
"name": "(gdbserver) Launch",
"type": "cppdbg",
"request": "launch",
"program": "${workspaceFolder}/bin/CFGP_bin_ConfigParam_cos",
"args": [],
"stopAtEntry": false,
"cwd": "${workspaceFolder}",
"environment": [],
"externalConsole": true,
"MIMode": "gdb",
"miDebuggerPath": "c:/cygwin64/bin/gdb.exe",
"miDebuggerServerAddress": "214.25.250.7:10000",
"targetArchitecture": "x86",
"linux": {
"MIMode": "gdb"
},
"windows": {
"MIMode": "gdb"
},
"setupCommands": [
{
"description": "Enable pretty-printing for gdb",
"text": "-enable-pretty-printing",
"ignoreFailures": true
}
]
}
]
}