Skip to content
This repository was archived by the owner on Jan 23, 2024. It is now read-only.
This repository was archived by the owner on Jan 23, 2024. It is now read-only.

Breakpoints will not work if prefixing the file with ./ when starting #79

@jasonborg

Description

@jasonborg

When using a leading ./ to start an app, such as in python3 ./main.py, all breakpoints attempts in main.py will fail to trigger.

When a breakpoint is set, the agent will scan the current loaded modules to find the match so it can install the breakpoint. The case here, when attempting to set a breakpoint in main.py, the module is loaded, however the agent fails to find it. The issue occurs in the utility function GetLoadedModuleBySuffix(). It uses the variable root to represent the path of the file being searched for, and the variable mod_root for each loaded module it tests root against.

In the scenario here, the variable root is /base/path/main, however the variable mod_root is /base/path/./main. By starting the app with the leading ./, it causes mod_root to also contain it, which causes the module matching to fail.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions