<
jgangemi@xxxxxxxxx <mailto:
jgangemi@xxxxxxxxx>> wrote:
hello all -
i started looking into how to get this working again and
have come up with a potential solution (and some blocking
issues), just to recap the use case i'm trying to solve
here...
i need to be able to debug perl code that is embedded
within another application. remote debugging already
supports the ability to 'map' remote resources into their
counterparts in the local workspace (this is done if the
'remote working directory' is set in the remote launch
config - if the resource does not exist, it is looked up
using the dbpg 'source' command). the problem setting
breakpoints against the mapped resource is that the path
to the file in the local workspace may not match what the
'fileuri' attribute that is returned when a connection has
been established. in order to have the dbgp engine respect
the breakpoint, the path returned from the 'fileuri'
attribute needs to be sent when the breakpoint is acted up
(created, removed).
code that is looked up via the 'source' command uses
overridden the 'getPath' method in the DBGPSourceModule
class to return the path from the stack frame and that
allows breakpoints to be successfully set, but they do not
appear because there is no IResource object available to
set the marker on. the workspace root should be able to
work as a stand in for the resource. i'm fairly certain
the mapping issue can also be solved using markers.
when the source is looked up using the
RemoteScriptSourceLookupDirector, right before the IFile
object is returned, a marker can be created that can be
used to store the path to the file on the remote host.
then in BreakpointUtils.getBreakpointResourceLocation, if
the IResource object isn't null, it can be checked for the
remote path marker, and if it exists, return that path
instead of the local object's resource.
the current roadblock i'm hitting comes in the
ScriptLineBreapoint class. both the getResourceName() and
getResourceURI() methods return the resource represented
by the breakpoint marker when it is not equal to the
workspace root. mapped resoures will never match this
case, so the local path will always be returned.
commenting out that conditional allows the remote
breakpoints to be properly set (local breakpoints still
work too), but that probably isn't the best thing to do.
do you guys think this is a workable approach? if yes,
suggestions on how to deal with the ScroptLineBreakpoint
roadblock are very welcomed. if no, i'm open to other
suggestions. i am really in need of a workable solution
because i've grown tired of the debugging hell i suffer
from on a daily basis at the day job. :)
-- -jae
_______________________________________________
dltk-dev mailing list