You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Uncomment the line and reload the project file with the `reload` command on sbt.
49
-
Now, each time you run `dotc` the compiler listens at the designated address and waits the agent to connect.
50
-
For, the second step you need to create a configuration for Debug through IDEA:
49
+
If you are interested in debugging the compiler, you can use a remote debugging configuration.
50
+
This is done by launching dotc's JVM with the JDWP agent loaded. To that end, run
51
+
```shell
52
+
$ ./bin/dotc -debug tests/pos/Arrays.scala
53
+
```
54
+
Then when dotc starts, it will suspend and wait for a debugger to connect on port `5005`.
55
+
Next a configuration for Debug must be created in IDEA:
51
56
52
57
> Run > Edit Configurations > Add New Configuration > (select) Remote
53
58
54
59

55
60
56
-
Now every time you run `dotc` you can set your breakpoints and hit the `Debug dotty-debug` button (since we used that name for
57
-
the sample configuration above). The default data on the configuration match the enabled agent on the VM so, probably,
61
+
Under `Search sources using module's classpath` select `dotty`. Set breakpoints as desired.
62
+
Then hit the button whose tooltip says `Debug dotty-debug` (since we used `dotty-debug` for the name of
63
+
the sample configuration above) in IDEA to connect the debugger to the JVM and begin debugging. The default data on the debug configuration matches the enabled agent on the VM so, probably,
0 commit comments