vscode-vlang icon indicating copy to clipboard operation
vscode-vlang copied to clipboard

Add launch.json for debugging when vscode is installed

Open sanathusk opened this issue 3 years ago • 4 comments

I have installed the Vs code extension for V, but when i try to debugging V code , by switching debug tab & clicking on Run & clicking on Run & debug button, no option for V lang is displayed in the selection drop down as shown below: image

The issues is same on windows, macOS & linux platform. I know that an empty launch.json can be created & modified to make it V lang specific can be done, but providing a v lang specific option out of box when extension is installed will help new users.I will make the experience seamless.

sanathusk avatar Jul 15 '22 05:07 sanathusk

Hi, thanks for your suggestion! I will be looking into how other language extensions does this. :)

nedpals avatar Jul 15 '22 09:07 nedpals

Thanks @nedpals

sanathusk avatar Jul 16 '22 15:07 sanathusk

from my late-night internet travels: this might best be tackled with vlang/v#14904 in mind

packysauce avatar Aug 12 '22 04:08 packysauce

My workaround:

Create main.c (empty file with *.c or *.cpp) and open it (make it active in vscode), then go to Debug pane and try to add a launch json config, GDB (or other c++ debug tools will be listed there because vscode think you are goint to debug a c++ program), then you can edit the .json file to point to the .exe generated from .v.

felixf4xu avatar Jun 17 '23 04:06 felixf4xu