How to debug on Vagrant using VSCode?

25 views
Skip to first unread message

Tyler Suard

unread,
Aug 26, 2019, 12:09:45 AM8/26/19
to Vagrant
Hello.  I have a macOS machine, with Vagrant running and installed.  On my macOS I use VScode.  I can access vagrant via terminal outside of VScode, but I want to be able to run and debug programs within my Vagrant environment.  How do I do that?  Not finding much info online.  Thanks for your help!

Dennis Chang

unread,
Aug 26, 2019, 12:33:43 PM8/26/19
to Vagrant
My understanding (someone else correct me if I'm wrong),

is that within any IDE environment (on a given host), you'll need to use a "deploy" function, in order to test your code on another host.

What I mean is, a vagrant VM is another host (accessible via SSH). So, if you're working locally on an IDE, the source code (locally) needs to be sync'ed to the remote host. And the IDE's that I've seen has a "deploy" function which allows you to do that. However, to execute, i.e. "run" your code, you can only use the console (through the IDE).

So my guess is, you can't develop code locally, and run it remotely (as if it was locally on the IDE).

Hope that help.

Tyler Suard

unread,
Aug 26, 2019, 1:21:36 PM8/26/19
to Vagrant
That was very helpful Dennis, thank you!
Reply all
Reply to author
Forward
0 new messages