-
Notifications
You must be signed in to change notification settings - Fork 34
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support building on linux build machine and debugging on linux target machine #109
Comments
This is very similar to issue #87. What I have ended up doing:
This has solved all of my problems. Whenever I want to build I select the Remote Build configuration and when I want to debug I select Remote Debug and it has worked quite good. The only problem is that visual studio doesn't know the latest state of the binary and always tells me that the binary is our of date/build was not successful. In Visual Studio 2017 you have the option to attach to the process on a remote machine. |
@AliAskari thank you, this is exactly the sort of workaround for this we've been suggesting until we enable separate build/debug targets. I have an example here similar to what you describe. https://github.com/robotdad/LinuxCrossCompile |
@robotdad thanks for your example. It was quite enlightening. I have a question though, I didn't catch how you configured the remote gdb debugger. We typically have a cross-compiled gdbserver running on the target, and a gdb running locally on the host. However, we don't use the standard gdb installed with ubuntu, but use the gdb which is provided as part of our cross-compile toolchain. So I guess I will need to build this gdb with cygwin or mingw and run it as part of vs debugging session ? |
Managed to do something locally to workaround this. |
In the embedded world, usually you cannot build on the target machine. You will build on a host machine and then load and debug on the target machine.
Since we won't always have a cross compiler available for windows, It would be very beneficial if we could use a Linux build box to build the project (for example a docker container or a VM) which has all the build environment configured, but support remote debugging a target machine. We should also support attaching to an already running process on a target and debugging it.
So basically the idea is to use Linux as the build environment, but use windows with visual studio as the IDE and debugging environment.
The text was updated successfully, but these errors were encountered: