Forum > General
[Solved] Debug a plugin DLL: start/run stays disabled
d7_2_laz:
This question here has a pre-history dealing with templates for Notepad++ plugin writing.
All templates i tried with Windows 10 64 bit, Lazarus 3.6 for Windows 64bit, recent Notepad++ version crashed … at addresses outside the scope of the pascal code though.
Until i found a well working example. See reply #9 in:
https://forum.lazarus.freepascal.org/index.php/topic,69562.0.html
I attached a (slightly modified by me) demo project there.
Unfortunately, after setting the 'host application' in the start parameters within this demo project, the “run/start” functionality is not enabled. For all crashing templates, it had been enabled.
Does anybody maybe know what one has to do for to unlock/enable the "Start" functionality after having set the host application for to be able to debug a plugin dll?
Martin_fr:
Strange...
First of all, I am guessing that all you other settings are unchanged.
So if you do: Project > New > Application ==> Then you can run this in the debugger.
Second, just to check (even though I doubt it would affect the run button)
Tools > Options > Debugger > Backend ==> is it gdb or FpDebug? (both should work, but try either)
--- Quote --- “run/start” functionality
--- End quote ---
The green button? Or the entry in the menu Run?
- Well they should be the same, but in the run menu, there is a 2nd entry, which should be "run without debugger". If that is "run with debugger" then you need to go to the project options, in there the compiler section the page debuggin, and make sure the checkbox "run uses the debugger" is set.
Also in project options, make sure "debug info" is enabled.
And on the page "Compiler commands" => compare the settings with those of a new project.
d7_2_laz:
Hi Martin, many thanks for attention!
First, no new application; i derived it from:
https://bitbucket.org/rdipardo/delphiplugintemplate/src/default/Readme.textile
Note, there's a Delphi as well as a Lazarus version herein.
If i look into:
debugger backend: -> FpDebug // with gdb i'll retry tomorrow
Run/start: green toolbutton (here also with no enabled dropdown about start parameters) as well as menu item Run. Both disabled.
"Run with or without debugger"? -> "Without debugger", had tried this (as expected without recognizable effect).
Project debugger option "Run uses the debugger" is set. "Generate info for debugger" is set.
"Compare the settings with those of a new [resp. working] project" -> did already, but will go more indepth tomorrow.
Probably it's a silly thing, debugging DLLs is a somehow unknown territory for me.
Martin_fr:
Debugging dll isn't the most used feature.... So the IDE might have some bugs.
I just played around a bit and I wasn't able with any of the settings to break it....
One other think to try.
- Remove (backup) the lpi file
- then open (drag drop) the lpr file
- the IDE should ask to create a project for it => yes, and library
Then try again.
If anything in the lpi is wrong then that should fix it
d7_2_laz:
Hm, tried first with comparing the lpi files from two related projects, where one has Run enabled, and the other not.
Many parameters different of course, but, focusing on those which seem to be potentially relevant, tried to bring them to match step-by-step.
No recognizable effect so far, regarding the enabling.
Then i backuped/removed the lpi file and tried to recreate it from the lpr file.
Drag/drop - how meant?
I did an 'Open with ...' of the lpr file targeting the lazarus.exe. Result:
I see my original project file in the IDE, but at first position additionally a very initial unit1 appears.
When compiling, it compiles to <drive>\Users\<username>\Appdata\Local\temp etc.
When doing 'Save project as ..', it offers a brandnew project1 with an project1.exe being generated then (exe!).
Same when (of course) telling the original project name as target.
With other words: by half a brand-new project will be created (i'd expected to save the existing project maybe as lpi, lpr, lps).
What might i have missed when trying to recreate the lpi file from the lpr file?
Edit: involved versions: Windows 10; Lazarus 3.6 64bit
Setting debugger backend to gdb instead of fpdebug: no change.
Navigation
[0] Message Index
[#] Next page