You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
var engine = new Jurassic.ScriptEngine();
engine.EnableDebugging = true;
return engine.Evaluate<string>(new FileScriptSource(@"C:\git\ApiAppTier\ApiAppTier\Scripts\HelloApi.js") );
My script is very basic:
var i = 1;
var x = 2;
'i + x = ' + (i + x);
There is a break point set on the script in the IDE; it's the same behavior if I use a debugger; statement.
The IDE breaks on the return line in the C# code. It never steps into the script; putting watches on the values i or x - which the debugger let's me do by right clicking the variable name in the script file - results in error CS0103: The name 'x' does not exist in the current context. This is occurring in Visual Studio 2017.
The text was updated successfully, but these errors were encountered:
I just stumbled upon this project, but I do some JavaScript/C# debugging for the windows runtime. With that, you can't both debug C# and JavaScript code simultaneously in VS.
You need to edit your project Properties and change the Debugger Type from 'Managed Only' to 'Script'. Then you should be able to debug JavaScript code (assuming they've integrated their system into the debugger). If you want to debug both at the same time, you'll need two instances of VS and attach one afterwards with the other debugger type.
@JeremyDurnell Ancient issue, I know, but I'm having a similar experience in VS 2019. Did you ever get debugging working? I wasn't able to find where to change the debugger type to 'Script', and trying to attach with a second instance of VS gave me an error about attaching multiple VS instances to the same process.
I'm loading a script using the following code:
My script is very basic:
There is a break point set on the script in the IDE; it's the same behavior if I use a
debugger;
statement.The IDE breaks on the return line in the C# code. It never steps into the script; putting watches on the values i or x - which the debugger let's me do by right clicking the variable name in the script file - results in
error CS0103: The name 'x' does not exist in the current context.
This is occurring in Visual Studio 2017.The text was updated successfully, but these errors were encountered: