danger / danger/kotlin

Improve debugging capabilities

Open
#229 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
Kotlin
Stars
542
Forks
48
PR merge metrics
No merged PRs in 30d

Description

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:
```bash
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

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by tracing the kotlinc invocation and systems.danger.kts.DangerFileScript entry point, including how arguments and in.json are handled. Verify that additional kotlinc parameters can be passed while preserving the Dangerfile.df.kts, PATH_TO_MR, in.json, and out.json flow; done means the local workflow can start with a debug server.

Written by the indexing model from the issue text.

Assessment

Tech stack
kotlin
Domain
cli, developer-experience
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.