Closed yami2200 closed 1 year ago
This is very nice! I'll try and look at it before my holidays start.
@yami2200 can you fill this open-source contributor license agreement, if you have not done so already? If there is any issue please contact Davy or me. CLA UseTheSource/Rascal
@yami2200 @DavyLandman I added license headers to .ts and .java via:
cd rascal-vscode-extension; npx license-check-and-add add -f license-config.json
cd ..
cd rascal-lsp; mvn license:format
I'm having fun with the debugger! One thing: operating very smoothly, fast en efficient. Love the variable/value viewer. Setting and unsetting breakpoints works very well. Stepping also (I'm not doing anything sophisticated yet).
Issues:
file
scheme. So it seems to skip the VFS abstraction for opening editors somehowrascalmpl
does not have registered debugger, but it does once you have a running terminal.rel[str, str]
shows only the first element (nope, my bad. example had only one tuple :-)About the implementation of :set debugging true
; let's generalize this with a regex for now, (it is very finicky with spaces now) and later hardwire :set debugging
into the generic REPL. If IDEServices does not offer this, then we can print a warning.
@yami2200 pls pull for the changes in :set debugging
semantics and the license headers.
@yami2200 is it possible to show the variables of the bottom stack frame? I.e. the REPL's scope? That would be very useful.
I have a stack trace right after (or during( :set debugging true
printed in the terminal itself. Still everything works after that.
I used auto-complete on the d<TAB>
.
rascal>Jul 18, 2023 9:49:55 AM org.eclipse.lsp4j.jsonrpc.RemoteEndpoint fallbackResponseError
SEVERE: Internal error: Parse error
at file:///Users/jurgenv/git/rascal/src/org/rascalmpl/repl/BaseRascalREPL.java offset=0 length=1 begin=1:0 end=1:1
java.util.concurrent.CompletionException: Parse error
at file:///Users/jurgenv/git/rascal/src/org/rascalmpl/repl/BaseRascalREPL.java offset=0 length=1 begin=1:0 end=1:1
at java.base/java.util.concurrent.CompletableFuture.encodeThrowable(CompletableFuture.java:314)
at java.base/java.util.concurrent.CompletableFuture.completeThrowable(CompletableFuture.java:319)
at java.base/java.util.concurrent.CompletableFuture$AsyncSupply.run(CompletableFuture.java:1702)
at java.base/java.util.concurrent.CompletableFuture$AsyncSupply.exec(CompletableFuture.java:1692)
at java.base/java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:290)
at java.base/java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(ForkJoinPool.java:1020)
at java.base/java.util.concurrent.ForkJoinPool.scan(ForkJoinPool.java:1656)
at java.base/java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1594)
at java.base/java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:183)
Caused by: Parse error
at file:///Users/jurgenv/git/rascal/src/org/rascalmpl/repl/BaseRascalREPL.java offset=0 length=1 begin=1:0 end=1:1
at org.rascalmpl.parser.gtd.SGTDBF.parse(SGTDBF.java:1197)
at org.rascalmpl.parser.gtd.SGTDBF.parse(SGTDBF.java:1235)
at org.rascalmpl.parser.gtd.SGTDBF.parse(SGTDBF.java:1240)
at org.rascalmpl.parser.gtd.SGTDBF.parse(SGTDBF.java:1252)
at org.rascalmpl.vscode.lsp.util.RascalServices.parseRascalModule(RascalServices.java:42)
at org.rascalmpl.vscode.lsp.dap.RascalDebugAdapter.lambda$setBreakpoints$1(RascalDebugAdapter.java:145)
at java.base/java.util.concurrent.CompletableFuture$AsyncSupply.run(CompletableFuture.java:1700)
... 6 more
Jul 18, 2023 9:49:55 AM org.eclipse.lsp4j.jsonrpc.RemoteEndpoint fallbackResponseError
SEVERE: Internal error: Parse error
at file:///Users/jurgenv/git/rascal/src/org/rascalmpl/library/Prelude.java offset=797 length=1 begin=17:0 end=17:1
java.util.concurrent.CompletionException: Parse error
at file:///Users/jurgenv/git/rascal/src/org/rascalmpl/library/Prelude.java offset=797 length=1 begin=17:0 end=17:1
at java.base/java.util.concurrent.CompletableFuture.encodeThrowable(CompletableFuture.java:314)
at java.base/java.util.concurrent.CompletableFuture.completeThrowable(CompletableFuture.java:319)
at java.base/java.util.concurrent.CompletableFuture$AsyncSupply.run(CompletableFuture.java:1702)
at java.base/java.util.concurrent.CompletableFuture$AsyncSupply.exec(CompletableFuture.java:1692)
at java.base/java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:290)
at java.base/java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(ForkJoinPool.java:1020)
at java.base/java.util.concurrent.ForkJoinPool.scan(ForkJoinPool.java:1656)
at java.base/java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1594)
at java.base/java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:183)
Caused by: Parse error
at file:///Users/jurgenv/git/rascal/src/org/rascalmpl/library/Prelude.java offset=797 length=1 begin=17:0 end=17:1
at org.rascalmpl.parser.gtd.SGTDBF.parse(SGTDBF.java:1197)
at org.rascalmpl.parser.gtd.SGTDBF.parse(SGTDBF.java:1235)
at org.rascalmpl.parser.gtd.SGTDBF.parse(SGTDBF.java:1240)
at org.rascalmpl.parser.gtd.SGTDBF.parse(SGTDBF.java:1252)
at org.rascalmpl.vscode.lsp.util.RascalServices.parseRascalModule(RascalServices.java:42)
at org.rascalmpl.vscode.lsp.dap.RascalDebugAdapter.lambda$setBreakpoints$1(RascalDebugAdapter.java:145)
at java.base/java.util.concurrent.CompletableFuture$AsyncSupply.run(CompletableFuture.java:1700)
... 6 more
Jul 18, 2023 9:49:55 AM org.eclipse.lsp4j.jsonrpc.RemoteEndpoint fallbackResponseError
SEVERE: Internal error: Parse error
at file:///Users/jurgenv/git/rascal/src/org/rascalmpl/values/parsetrees/SymbolAdapter.java offset=699 length=1 begin=16:0 end=16:1
java.util.concurrent.CompletionException: Parse error
at file:///Users/jurgenv/git/rascal/src/org/rascalmpl/values/parsetrees/SymbolAdapter.java offset=699 length=1 begin=16:0 end=16:1
at java.base/java.util.concurrent.CompletableFuture.encodeThrowable(CompletableFuture.java:314)
at java.base/java.util.concurrent.CompletableFuture.completeThrowable(CompletableFuture.java:319)
at java.base/java.util.concurrent.CompletableFuture$AsyncSupply.run(CompletableFuture.java:1702)
at java.base/java.util.concurrent.CompletableFuture$AsyncSupply.exec(CompletableFuture.java:1692)
at java.base/java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:290)
at java.base/java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(ForkJoinPool.java:1020)
at java.base/java.util.concurrent.ForkJoinPool.scan(ForkJoinPool.java:1656)
at java.base/java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1594)
at java.base/java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:183)
Caused by: Parse error
at file:///Users/jurgenv/git/rascal/src/org/rascalmpl/values/parsetrees/SymbolAdapter.java offset=699 length=1 begin=16:0 end=16:1
at org.rascalmpl.parser.gtd.SGTDBF.parse(SGTDBF.java:1197)
at org.rascalmpl.parser.gtd.SGTDBF.parse(SGTDBF.java:1235)
at org.rascalmpl.parser.gtd.SGTDBF.parse(SGTDBF.java:1240)
at org.rascalmpl.parser.gtd.SGTDBF.parse(SGTDBF.java:1252)
at org.rascalmpl.vscode.lsp.util.RascalServices.parseRascalModule(RascalServices.java:42)
at org.rascalmpl.vscode.lsp.dap.RascalDebugAdapter.lambda$setBreakpoints$1(RascalDebugAdapter.java:145)
at java.base/java.util.concurrent.CompletableFuture$AsyncSupply.run(CompletableFuture.java:1700)
... 6 more
Jul 18, 2023 9:49:55 AM org.eclipse.lsp4j.jsonrpc.RemoteEndpoint fallbackResponseError
SEVERE: Internal error: Parse error
at file:///Users/jurgenv/git/rascal/src/org/rascalmpl/types/NonTerminalType.java offset=611 length=1 begin=14:0 end=14:1
java.util.concurrent.CompletionException: Parse error
at file:///Users/jurgenv/git/rascal/src/org/rascalmpl/types/NonTerminalType.java offset=611 length=1 begin=14:0 end=14:1
at java.base/java.util.concurrent.CompletableFuture.encodeThrowable(CompletableFuture.java:314)
at java.base/java.util.concurrent.CompletableFuture.completeThrowable(CompletableFuture.java:319)
at java.base/java.util.concurrent.CompletableFuture$AsyncSupply.run(CompletableFuture.java:1702)
at java.base/java.util.concurrent.CompletableFuture$AsyncSupply.exec(CompletableFuture.java:1692)
at java.base/java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:290)
at java.base/java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(ForkJoinPool.java:1020)
at java.base/java.util.concurrent.ForkJoinPool.scan(ForkJoinPool.java:1656)
at java.base/java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1594)
at java.base/java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:183)
Caused by: Parse error
at file:///Users/jurgenv/git/rascal/src/org/rascalmpl/types/NonTerminalType.java offset=611 length=1 begin=14:0 end=14:1
at org.rascalmpl.parser.gtd.SGTDBF.parse(SGTDBF.java:1197)
at org.rascalmpl.parser.gtd.SGTDBF.parse(SGTDBF.java:1235)
at org.rascalmpl.parser.gtd.SGTDBF.parse(SGTDBF.java:1240)
at org.rascalmpl.parser.gtd.SGTDBF.parse(SGTDBF.java:1252)
at org.rascalmpl.vscode.lsp.util.RascalServices.parseRascalModule(RascalServices.java:42)
at org.rascalmpl.vscode.lsp.dap.RascalDebugAdapter.lambda$setBreakpoints$1(RascalDebugAdapter.java:145)
at java.base/java.util.concurrent.CompletableFuture$AsyncSupply.run(CompletableFuture.java:1700)
... 6 more
cancelled
:set debugging true/false
to start or stop debug session