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

Improve debugging capabilities #229

Open
pinguinjkeke opened this issue Jun 8, 2022 · 1 comment
Open

Improve debugging capabilities #229

pinguinjkeke opened this issue Jun 8, 2022 · 1 comment

Comments

@pinguinjkeke
Copy link
Contributor

It's very hard to run debug locally which is very important.

Current caveats:

  • Can't run it directly from IDE
  • There is no possibility to pass additional parameters to kotlinc. I'm passing -J-agentlib:jdpwp... to run a debug server
  • in.json must be extracted temp folder from regular non-debug run

My current script:

echo "" > out.json
DEBUG=true \
DANGER_GITLAB_HOST=... \
DANGER_GITLAB_API_TOKEN=... \
kotlinc -J-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=127.0.0.1:8001 -script-templates systems.danger.kts.DangerFileScript \
-cp /usr/local/lib/danger/danger-kotlin.jar \
-script Dangerfile.df.kts \
PATH_TO_MR \
in.json \
out.json

At least, the ability to pass additional kotlinc parameters will make the debugging much easier

@gianluz
Copy link
Member

gianluz commented Dec 12, 2022

i'm investigating the possibility to add additional parameters to kotlinc if necessary, regarding running danger locally you can achieve that by using the command danger-kotlin pr {link to the pr} with DEBUG activated like:

DEBUG='*' danger-kotlin pr {LINK TO THE PR} --dangerfile /path/to/Dangerfile.df.kts

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