mirror of
https://github.com/enso-org/enso.git
synced 2024-11-25 21:25:20 +03:00
Documenting how to debug project-manager project (#7153)
``` sbt:project-manager> withDebug run --debugger ```
This commit is contained in:
parent
60ef7e0ba3
commit
91f661fd8b
@ -775,6 +775,7 @@ lazy val `project-manager` = (project in file("lib/scala/project-manager"))
|
||||
(Compile / run / fork) := true,
|
||||
(Test / fork) := true,
|
||||
(Compile / run / connectInput) := true,
|
||||
commands += WithDebugCommand.withDebug,
|
||||
libraryDependencies ++= akka ++ Seq(akkaTestkit % Test),
|
||||
libraryDependencies ++= circe,
|
||||
libraryDependencies ++= Seq(
|
||||
|
@ -404,7 +404,13 @@ withDebug benchOnly --showCompilations -- RecursionBenchmark
|
||||
Step by step debugging can be triggered as
|
||||
|
||||
```
|
||||
withDebug testOnly --debugger -- *FavoriteTest*
|
||||
sbt:runtime> withDebug testOnly --debugger -- *FavoriteTest*
|
||||
```
|
||||
|
||||
One can debug `project-manager` code by executing
|
||||
|
||||
```
|
||||
sbt:project-manager> withDebug run --debugger
|
||||
```
|
||||
|
||||
read more about [debugging Java & Enso code](debugger/README.md).
|
||||
|
@ -61,16 +61,37 @@ IDE.
|
||||
|
||||
Get [NetBeans](http://netbeans.apache.org) version 13 or newer or
|
||||
[VS Code with Apache Language Server extension](https://cwiki.apache.org/confluence/display/NETBEANS/Apache+NetBeans+Extension+for+Visual+Studio+Code)
|
||||
and just pass in special JVM arguments when launching the `bin/enso` launcher:
|
||||
and _start listening on port 5005_ with _Debug/Attach Debugger_ or by specifying
|
||||
following debug configuration in VSCode:
|
||||
|
||||
```bash
|
||||
enso$ JAVA_OPTS=-agentlib:jdwp=transport=dt_socket,server=y,address=8000 ./built-distribution/enso-engine-*/enso-*/bin/enso --run ./test/Tests/src/Data/Numbers_Spec.enso
|
||||
Listening for transport dt_socket at address: 8000
|
||||
```json
|
||||
{
|
||||
"name": "Listen to 5005",
|
||||
"type": "java+",
|
||||
"request": "attach",
|
||||
"listen": "true",
|
||||
"hostName": "localhost",
|
||||
"port": "5005"
|
||||
}
|
||||
```
|
||||
|
||||
and then _Debug/Attach Debugger_. Once connected suspend the execution and (if
|
||||
the Enso language has already been started) choose the _Toggle Pause in GraalVM
|
||||
Script_ button in the toolbar:
|
||||
Then it is just about executing following Sbt command which builds CLI version
|
||||
of the engine, launches it in debug mode and passes all other arguments to the
|
||||
started process:
|
||||
|
||||
```bash
|
||||
sbt:enso> runEngineDistribution --debug --run ./test/Tests/src/Data/Numbers_Spec.enso
|
||||
```
|
||||
|
||||
Alternatively you can pass in special JVM arguments when launching the
|
||||
`bin/enso` launcher:
|
||||
|
||||
```bash
|
||||
enso$ JAVA_OPTS=-agentlib:jdwp=transport=dt_socket,server=n,address=5005 ./built-distribution/enso-engine-*/enso-*/bin/enso --run ./test/Tests/src/Data/Numbers_Spec.enso
|
||||
```
|
||||
|
||||
As soon as the debuggee connects and the Enso language starts - choose the
|
||||
_Toggle Pause in GraalVM Script_ button in the toolbar:
|
||||
|
||||
![NetBeans Debugger](https://user-images.githubusercontent.com/26887752/209614191-b0513635-819b-4c64-a6f9-9823b90a1513.png)
|
||||
|
||||
|
@ -230,7 +230,7 @@ public final class Builtins {
|
||||
/**
|
||||
* Returns a list of supported builtins.
|
||||
*
|
||||
* <p>Builtin types are marked via @BuiltinType annotation. THe metdata file represents a single
|
||||
* <p>Builtin types are marked via @BuiltinType annotation. The metadata file represents a single
|
||||
* builtin type per row. The format of the row is as follows: <Enso name of the builtin
|
||||
* type>:<Name of the class representing it>:[<field1>,<field2>,...] where the last column gives a
|
||||
* list of optional type's fields.
|
||||
|
Loading…
Reference in New Issue
Block a user