Eclipse - DDT :: How to debug source files not located in 'src' folder

Bruno Medeiros via Digitalmars-d-debugger digitalmars-d-debugger at puremagic.com
Tue Apr 12 03:08:56 PDT 2016


On 28/03/2016 22:58, Luigi wrote:
> Hi everybody,
> I am studying the cairod library and running some examples. I am using
> DDT and the example is a dub project. Moreover one of the source file of
> the program is outside 'src' folder where the main file is present.
> My problem. Debugging the program it happens, going step by step, to
> pass to function defined into a package.d file, but DDT returns an info:
> "can't find a source  file at..." and I cannot follow anymore the rows
> under debug. I cannot even place a breakpoint. Even if at the location
> indicated by DDT the file exist and the source should be the correct one.
> If I move that file within the 'src' directory I can still compile and I
> can follow the execution row by row also inside the moved file.
> I am looking for a way to include among the source files, in a DUB
> project in DDT, a directory that is not the 'src' one foreseen for the
> project directory.
> I've tried with gdb and it works. With gdb it was enough to include the
> directory includes the package.d file and I had no issue. I do not know
> how to let it works using DDT. I've tried several options but no one was
> actual. I did several searches on Internet with no good results.
> Maybe the behavior is correct, I do not know. Anyone can explain to me
> the matter?
> Thanks,
> Luigi

Sorry for late reply, but I don't typically check the D.debugger 
newsgroups (if you have a question about DDT, you can open a Github 
issue for that, that will guarantee faster response).

As for your issue, did you try the settings in the debug configuration? 
In the "Source" tab ( 
https://raw.githubusercontent.com/DDT-IDE/DDT/latest/documentation/screenshots/UserGuide_DebuggerLaunchConfiguration.png 
) you can configure additional source mappings for the Eclipse debugger 
to find the .d source files.


-- 
Bruno Medeiros
https://twitter.com/brunodomedeiros


More information about the Digitalmars-d-debugger mailing list