Hi everyone,
I have a question regarding Eclipse's debug platform. I don't know if this
mailing list is the right place to ask for help, so please tell if there's a
better way.
I am working on the integration of a custom language within Eclipse IDE. I have
an interpreter written in Java and now I would like to implement a dedicated
debugger.
I already managed to implement a debug configuration bounded to my interpreter
and which provides a step-by-step execution.
The issue is that my language is able to execute "scripts" written in other
languages (such as Java or Python) and I don't know how to allow the user to
debug them. Ideally, I would like to rely on existing debuggers such as the
ones providing by JDT, CDT or PyDev. Concretely, I'd like the user to be able
to:
1. Create a script in Java/Python/whatever
2. Add a breakpoint within the file
3. Create a program with my language that uses the script
4. Launch the program in debug mode
5. My custom interpreter starts the execution of the program
6. Wait for the breakpoint to be handled by the debugger provided by
JDT/PyDev/whatever
7. Benefit from the Debug perspective to check stacktrace, variables, etc.
For completeness about the way scripts are currently executed:
* Each script is wrapped as a Java object:
* for Java scripts I just load the class from the classpath
* for Python scripts the Java object uses Py4J to execute the script
I thought about several solutions:
* relying on JDT/CDT/whatever to launch the script, but that would be a bit
cumbersome and sharing data between the Java interpreter and the script would
be hard
* creating kind of a CompositeDebugTarget that would somehow delegate
events to available debuggers so that they can handle them but I'm not sure
whether it's actually practical
I took a look at the Scala IDE and GDT's source code to check how they provide
a debugger but it seems that they rely on the generic JavaLaunchDelegate (from
JDT), which does not solve my problem.
This message is a bit dense, so thanks to everyone who took the time to read it!
Does anyone have an idea on how I could benefit from existing debuggers? Is
that even possible?
Regards,
Emmanuel
_______________________________________________
platform-dev mailing list
[email protected]
To change your delivery options, retrieve your password, or unsubscribe from
this list, visit
https://www.eclipse.org/mailman/listinfo/platform-dev