Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » Debug support for DSL in Xtext
Debug support for DSL in Xtext [message #555713] Fri, 27 August 2010 18:53 Go to next message
No real name is currently offline No real nameFriend
Messages: 101
Registered: August 2010
Senior Member
Hi,

I'm a new user of a Xtext/Eclipse. I'm reading through the documentation. I'm interested in creating a small domain-specific language. Let's say I defined my language and write a code generator for this with Xtext. For example, say 1 line in my DSL executes 10 lines of C/C++ code. I can use the existing C/C++ development tools for building/running/debugging the generated code.

My question is regarding debugging - single stepping through my DSL. Since the generator is generating C/C++ code, I can single step that in gdb. However, is it possible or is thre an interface where I can do the following.

1. I put a break point in my DSL. I say single-step. That executes the 10 lines of code and then moves the cursor position down do the next line and stops.

Thus, I want to single step through my DSL and not the generated code. Is there some way to do this in Etext/Eclipse?

Thank you for any pointers/help.

[Updated on: Fri, 27 August 2010 18:55]

Report message to a moderator

Re: Debug support for DSL in Xtext [message #555716 is a reply to message #555713] Fri, 27 August 2010 19:14 Go to previous messageGo to next message
Alexander Nittka is currently offline Alexander NittkaFriend
Messages: 1193
Registered: July 2009
Senior Member
Hi,

I cannot give you a definite answer. It may be possible, but it is not supported out of the box (how should it) and also it will very probably be hard to implement.

Basically, your DSL has nothing to do with the generated code. The model file does not know what you do with it (after all, nothing prevents you from having hundreds of different generators, processing the file) and the generated code does not know where it is coming from (it may well have been entered by hand).

Alex
Re: Debug support for DSL in Xtext [message #555720 is a reply to message #555716] Fri, 27 August 2010 19:30 Go to previous messageGo to next message
Ed Willink is currently offline Ed WillinkFriend
Messages: 7655
Registered: July 2009
Senior Member
Hi

This is a standard problem well-supported by good C tooling.

When generating C/C++ just output lots of #line directives so that
the source code stepper can identify the user perspective of the source
line.

Regards

Ed Willink

On 27/08/2010 20:14, Alexander Nittka wrote:
> Hi,
>
> I cannot give you a definite answer. It may be possible, but it is not
> supported out of the box (how should it) and also it will very probably
> be hard to implement.
>
> Basically, your DSL has nothing to do with the generated code. The model
> file does not know what you do with it (after all, nothing prevents you
> from having hundreds of different generators, processing the file) and
> the generated code does not know where it is coming from (it may well
> have been entered by hand).
>
> Alex
Re: Debug support for DSL in Xtext [message #1059859 is a reply to message #555713] Wed, 22 May 2013 00:36 Go to previous message
April Dai is currently offline April DaiFriend
Messages: 3
Registered: April 2013
Junior Member
Hi,

We are facing the same issue, we have defined a dsl, and it is getting translated to a legacy language, would like to provide debugging support, but the execution of one line in dsl may result in multiple lines in the legacy code...

Were you able to find a solution for your problem?

Thanks,
Previous Topic:Using xpand templates in xtext 2
Next Topic:add a field Automatically
Goto Forum:
  


Current Time: Thu Apr 25 01:41:11 GMT 2024

Powered by FUDForum. Page generated in 0.02901 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top