hugeBlack / McfDebugger_Extension

A debugger that can be used to debug minecraft functions
MIT License
15 stars 2 forks source link

Only interrupt for certain CommandSyntaxExceptions #2

Open misode opened 3 years ago

misode commented 3 years ago

Most command runtime exceptions are actually intended in data packs. For example setting a block when the block already exists or adding a scoreboard objective when it already exists. Some commands simply are meant to check for failures. By default these shouldn't cause an interrupt.

image image

However some errors like missing arguments which are not currently checked at compile time should cause an interrupt.

image

If it is hard to decide whether or not an exception is intended or should cause an interrupt, a simple configuration to disable all runtime exceptions would also be useful.

hugeBlack commented 3 years ago

Thank for your issue!

For now, there is a #@mute that you can use to make the debugger to ignore any exception caused by the following line.

Actually Mcfdebugger is not able to check functions and it don’t compile functions because it don’t have a language server with it. I suppose you have another extension that checks the grammar already.

Yes, it’s hard to decide whether the exception is intended or not.

I might make a #@muteAll command that can be used to ignore exceptions in specific function and, thank for your advice, a configuration that disable specific or all exceptions. Also, reports should be sent when grammatical errors occurs.

hugeBlack commented 3 years ago

Sorry for being so late. Now version 0.1.1 is available with the --nonStopOnException. You can now see the exceptions from the debug console instead of pausing the game.