Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Debugging #25

Closed
DaniilMonin opened this issue Mar 17, 2014 · 13 comments
Closed

Debugging #25

DaniilMonin opened this issue Mar 17, 2014 · 13 comments

Comments

@DaniilMonin
Copy link

One of best feature of Jint was a debugger for scripts:

JintEngine engine = new JintEngine();
engine.SetDebugMode(true);

jint.Step += (sender, info) =>
{
   Console.WriteLine("{0}: Line {1}, Char {2}", info.CurrentStatement.ToString(), info.Location.Start.Line, info.Location.Start.Char);
};

But currently there no any out-of-box debugger (Jint.Debugger.DebugInformation) in Jint v.2 to get information about
a. Executed statement,
2. call stack,
3. local variables.

@TheCyberCore
Copy link

I would like to add myself to this request. The debugging feature was a quite unique and very good feature.

I'd love to see this feature again!

@Hooch180
Copy link

Me too.

@honestegg
Copy link
Contributor

We had been using this as well. We actually used it to stop executing a script if it was taking too long.

@DaniilMonin
Copy link
Author

Hello! Do you have any plans to implement debug?

@sebastienros
Copy link
Owner

Right now I can't commit on this, but if anyone want to create a PR based on the previous implementation I'd be happy to take it in.

@rolandroos
Copy link

I added this feature. I'll tell you how in a separate "jint debugger" github.

Baisically, I added += Eventhandler in the engine.
Kindof 3 lines of code.

If you have a separate thread, you can listen to every executed line.
If you do an AutoResetEvent there, you can step-by-step debug all lines, and refer to the executed line.

@TheCyberCore
Copy link

Thanks alot. I'm looking for the next revision.

@fvaneijk
Copy link
Contributor

I submitted a PR to add the debug feature see PR #136

@ZSalloum
Copy link

Hi I am new in here.

I tested Jint on few things and I liked it.
However what is missing is the ability to custom debug.
Jint is useful to extend applications, which also requires a mini IDE/Editor with a debugging feature.
This will help those who extend those applications to debug their code.

Looking forward for such a feature.

@lontivero
Copy link

I am developing a Windows Service that is extended (thx Jint) using javascript and the point is that oftentimes I get TypeErrors and I don't have an easy way to know what was wrong. I think the debugging feature could help.

@doronguttman
Copy link

+1 I use Jint as an interpreter for customer's custom code. That way I can allow them to extend the functionality of my application. Often they are baffled when trying to debug their own extensions event with the amount of logs I provide them.
Ideally, I would like to add an option for them to debug their code.

@rolandroos
Copy link

I'll upload my debugger soon. Next week.

2015-03-31 1:17 GMT+02:00 doronguttman notifications@github.com:

+1 I use Jint as an interpreter for customer's custom code. That way I can
allow them to extend the functionality of my application. Often they are
baffled when trying to debug their own extensions event with the amount of
logs I provide them.
Ideally, I would like to add an option for them to debug their code.


Reply to this email directly or view it on GitHub
#25 (comment).

drs. ing. Roland Roos

Roos ICT Architectures
mobile : +31 6 1942 8055
e-mail : roos.ict.architectures@gmail.com

@fvaneijk
Copy link
Contributor

fvaneijk commented Apr 1, 2015

The following branch gives some code on how to add debugging support. Not complete but you should get the general idea.

https://github.com/fvaneijk/jint/tree/addDebugger

Looking forward to see your implementation rolandroos...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

10 participants