Situation: on the local machine is VSCode , from under it the project is corrected on the remote machine via ftp.

Question: how to set up a project to compile on a remote machine and debug on a local using Visual Studio Code ?

In essence, all that is required is to run make on the remote machine and pick up the debugger on it. You can run make for example using a task.json script, something in the spirit of:

{ "version": "0.1.0", "command": "make", "isShellCommand": true, "tasks": [ { "taskName": "Makefile", // Make this the default build command. "isBuildCommand": true, // Show the output window only if unrecognized errors occur. "showOutput": "always", // No args "args": ["all"], // Use the standard less compilation problem matcher. "problemMatcher": { "owner": "cpp", "fileLocation": ["relative", "${workspaceRoot}"], "pattern": { "regexp": "^(.*):(\\d+):(\\d+):\\s+(warning|error):\\s+(.*)$", "file": 1, "line": 2, "column": 3, "severity": 4, "message": 5 } } } ] } 

But how to run it on a remote machine, as well as remote debugging - these questions are not very clear.

  • 2
    I think it does. The best option is to do RDP to the remote machine. - gecube
  • 3
    If the remote machine is under Linux, then the build can be started via ssh, debugging via gdbserver. - kmv
  • Wasps on your remote machine and what? what debagger is there, etc. Do you have admin rights there, can you add software? This is a question of uncomplicated automation, to which you yourself would be able to google. google://expect ssh powershell remote debug (visual studio/gdb) - strangeqargo
  • My OS is Ubuntu, the remote one is QNX 6. Debagger, respectively, is gdb. There are admin rights, generally the machine is spinning in VirtualBox. I can certainly add software, but I would like to add at a minimum, because Practice shows that any installation of software not honed under QNX for this OS is a very dreary affair, and often not possible. - Alexander G.
  • kmv , if not difficult, then it can be a little more detailed how to do it from under VSCode? Need to create a task.json of a specific format or some other actions? - Alexander G.

0