Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [Dltk-dev] setting remote breakpoints

Hi Jae,

>  one of the other things i've been investigating due to some pressing
> needs at the day job is getting remote breakpoints to work properly.
> just to refresh, the current issues are:
>
>   a) if the code was looked up via the dbgp 'source' command, double
> clicking in the editor ruler window (or using the ruler menu) appears
> to do nothing - but really the issue is the path that is being sent
> back to the engine when the breakpoint is set is incorrect. it does
> not match the location on the remote host.
>
>   b) if a user specified a remote working directory in the launch
> config, the remote source lookup director checks to see if the file
> name matches anything in the project workspace, and if it does, it
> returns an IFile reference and the editor will open the local
> resource. if you try to set a breakpoint here, the annotation icon
> appears, but the breakpoint does not get set for the same reason as
> the source that was looked up, the path does not match the location on
> the remote host.
I suppose this is because EditorInput implements ILocationProvider
interface.
>
>   i have figured out a potential solution for part 'a', but that
> raises another issue.
>
>   if i override getPath in the DBGPSourceModule to return the path of
> the remote script and double click the ruler, the breakpoint is
> properly set on the remote source, but no annotation appears in the
> ruler. this is caused b/c there is no IResource that represents the
> retrieved source, so it can't create the marker resource.
We could implement it as current breakpoint support for external source
modules, we put markers to workspace root.
>
>   however, i'm not 100% sure it's a good idea to change getPath in the
> DBGPSourceModule, so my proposal would be to add a method to the
> IExternalSourceModule interface called getDbgpPath() - the default
> implementation would call getPath(), but it could be overridden to use
> the path for retreived source. this would also require the
> ExternalStoragedEditorInput to provide an adapter for the
> IExternalSourceModule that could be used by BreakpointUtils when it
> calls getBreakpointResourceLocation(ITextEditor editor).
I think overriding is not a good idea. Maybe a better way is to add
method which returns URI?

>  
>   up to here would be a great help to me right now - even with the
> visual limitiation of no breakpoints in the ruler, they do appear in
> the breakpoint view, so all is not lost there. i can even deal with
> not being able to map the code back to my source tree - getting
> breakpoints on some kind of remote resource right now would be a huge win.
>
>   as for what to do about the missing annotations and source mapped
> into the project, here are my initial thoughts - some kind of
> IResource or IFile wrapper needs to be created that represents the
> remote source. if we need to have a location on disk, we can use
> somplace in the plugin's 'state' location for now and perhaps that
> could be leveraged to move the resource into the workspace in the
> future. it may also make sense to initially wrap the IFile resource in
> the DBGPSourceModule and return that when the IResource is requested
> to open the editor, but rely on the getDbgpPath() method when creating
> the breakpoint.
I suppose this is not required, it we set markers to workspace root as
for external source modules.

Best regards,
Andrei Sobolev.


Back to the top