enso/docs/debugger/README.md

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

22 lines
664 B
Markdown
Raw Normal View History

---
layout: section-summary
title: Debugger
category: debugger
tags: [debugger, repl, readme]
order: 0
---
Debug Enso language in ChromeDev tools with --inspect option (#3432) Finally this pull request proposes `--inspect` option to allow [debugging of `.enso`](https://github.com/enso-org/enso/blob/e948f2535f71249daed647181324746613081d29/docs/debugger/README.md) in Chrome Developer Tools: ```bash enso$ ./built-distribution/enso-engine-0.0.0-dev-linux-amd64/enso-0.0.0-dev/bin/enso --inspect --run ./test/Tests/src/Data/Numbers_Spec.enso Debugger listening on ws://127.0.0.1:9229/Wugyrg9Nm4OUL9YhzdcElmLft71ayZW3LMUPCdPyNAY For help, see: https://www.graalvm.org/tools/chrome-debugger E.g. in Chrome open: devtools://devtools/bundled/js_app.html?ws=127.0.0.1:9229/Wugyrg9Nm4OUL9YhzdcElmLft71ayZW3LMUPCdPyNAY ``` copy the printed URL into chrome browser and you should see: ![obrazek](https://user-images.githubusercontent.com/26887752/167235327-8ad15fb2-96d4-4a0c-9e31-ed67ab46578b.png) One can also debug the `.enso` files in NetBeans or [VS Code with Apache Language Server extension](https://cwiki.apache.org/confluence/display/NETBEANS/Apache+NetBeans+Extension+for+Visual+Studio+Code) just pass in special JVM arguments: ```bash enso$ JAVA_OPTS=-agentlib:jdwp=transport=dt_socket,server=y,address=8000 ./built-distribution/enso-engine-0.0.0-dev-linux-amd64/enso-0.0.0-dev/bin/enso --run ./test/Tests/src/Data/Numbers_Spec.enso Listening for transport dt_socket at address: 8000 ``` and then _Debug/Attach Debugger_. Once connected choose the _Toggle Pause in GraalVM Script_ button in the toolbar (the "G" button): ![obrazek](https://user-images.githubusercontent.com/26887752/167235598-98266c7e-beb5-406b-adc6-8167b3d1b453.png) and your execution shall stop on the next `.enso` line of code. This mode allows to debug both - the Enso code as well as Java code. Originally started as an attempt to write test in Java: * test written in Java * support for JUnit in `build.sbt` * compile Java with `-g` - so it can be debugged * Implementation of `StatementNode` - only gets created when `materialize` request gets to `BlockNode`
2022-05-10 11:55:08 +03:00
# Enso Debugger
2020-07-21 15:59:40 +03:00
This folder contains all documentation pertaining to the debugging facilities
used by Enso, broken up as follows:
- [**The Enso Debugger Protocol:**](./protocol.md) The protocol for the REPL
Debugger.
- [**Chrome devtools debugger:**](./chrome-devtools.md) A guide how to debug
Enso code using Chrome devtools.
- [**Debug adapter protocol:**](./dap.md) A guide how to debug Enso code using
VSCode.
- [**Debugging Engine (Runtime) only Java code:**](./runtime-debugging.md) A
2023-11-27 11:37:51 +03:00
guide how to debug Enso code & the internal Java code.