Skip to content
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

How to run in debug & test mode? #46

Open
SGarno opened this issue Apr 28, 2021 · 1 comment
Open

How to run in debug & test mode? #46

SGarno opened this issue Apr 28, 2021 · 1 comment

Comments

@SGarno
Copy link

SGarno commented Apr 28, 2021

How can I run Guark in debug mode from VSCode? Engine.new is undefined since it requires the guark cli.

Also, I need to run tests that interoperate with the UI and Guark. How can I bootstrap tests where Guark is enabled?

@knobik
Copy link
Contributor

knobik commented May 3, 2021

Im linux only atm so cant help you with mac/win configuration but this is how i do it on linux:

guark-build.yml needs some debug flags attached.

linux:
  ldflags: "ldflags=\"all=-N -l\""

then you can build and run in debug mode:

guark build --rm && dlv --listen=:2345 --headless=true --api-version=2 --accept-multiclient exec ./dist/linux/YOURAPP

and attach an debugger (i dont know how to do it from VSCode... but in Goland you would just add a remote debugger configuration that connects to localhost:2345

more info here: https://github.com/golang/vscode-go/blob/master/docs/debugging.md

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants