Can we catch Error Exception in JINT debugger Step Mode #2166
Unanswered
RanjeetShinde
asked this question in
Q&A
Replies: 1 comment
-
You can't catch a JS or Parser exception inside a The debugger doesn't really have anything to do with exceptions, and it's been a while since I looked deeply into Jint, so don't know if exceptions have been unified yet, and not sure if they include the currently executing node. If they do, the node would include the source location. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi @Jither @sebastienros @lahma,
In the JINT debugger, can we get line number and column information in exceptions? if script is having any issue.
Is it possible to catch an exception in debugstep like in below code
private StepMode EngineStep(object sender, DebugInformation debugInfo)
{
try
{
Assert.NotNull(sender);
Assert.IsType(typeof(Engine), sender);
Assert.NotNull(debugInfo);
var currentstatment = debugInfo.CurrentNode;
var globalScope = debugInfo.CurrentScopeChain.Single(s => s.ScopeType == DebugScopeType.Global);
var dsdsdsdsd = debugInfo.CurrentNode;
for (int i = 63; i < globalScope.BindingNames.Count; i++)
{
var names = globalScope.BindingNames[i];
JsValue value = globalScope.GetBindingValue(names);
var ddsdssdsd = value;
}
return stepMode;
}
catch(JavaScriptException ex)
{
var messa = ex;
return stepMode;
}
}
Engine Code :
Script :
var str5 = 'ranjeet shinde i am programer'
var array = str.split('i')
Beta Was this translation helpful? Give feedback.
All reactions