Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Allow further attach options for debugging. #24

Merged
merged 4 commits into from
Mar 13, 2024

Conversation

F-Dudley
Copy link
Contributor

@F-Dudley F-Dudley commented Mar 7, 2024

Changed the attach script launching of the debug session, to use the attach configuration settings.
Allowing for more settings to be passed to the launch of the debug session.

Kept the added attach parameters to be true by default. So current usability isn't affected, but can be better modied from settings. Not many attach params but more can be added if needed.


Closes #23

Changed the attach script, to use a new config section "attach". That contains any extra parameters that get passed to the debug session launch, over just sending the port.
@nils-soderman
Copy link
Owner

Hi,

This is a great idea and thanks for taking time to look into a solution for this as well!

I just have a few notes:

  • The ue-python.debug.port config needs to be deprecated before it's removed. So users has a chance to update before it potentially breaks.
  • "showOutput" doesn't seem to be a valid python debug argument?
  • For the description of the justMyCode config, we can probably copy the offical docs: "Restricts debugging to user-written code only. Set to false to also enable debugging of standard library functions."
  • The return value of await utils.findFreePort(startPort, 101) needs to be assigned to attachConfig.port.

Otherwise nicely done, looks like a really clean solution!

Feel free to look at this if you want to, otherwise I can probably take a look at this at some point during this week.

Refactor to use the found free port.

Revert config port changes, while adding a deprecation status.
@F-Dudley
Copy link
Contributor Author

Amended for the recommended changes.
Had to refactor slightly again due to typechecking not liking the if (!attachOptions) null check.

Another adjustment could possibly move the strictPort config option to attach as well, as don't think it is used anywhere else (correct me if I'm wrong) but is up to you. Would just require a seperation of the strictPort and other config options after loading.

@nils-soderman
Copy link
Owner

All looks good, thank you for this contribution!

StrictPort is currently used in the modules/remote-handler.ts file as well. When deciding on which port to use for communication with Unreal.

@nils-soderman nils-soderman merged commit e76bf9a into nils-soderman:main Mar 13, 2024
@nils-soderman
Copy link
Owner

I've currently credited you as "F-Dudley" in the CHANGELOG.md. But just let me know if you have another preferred name

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Allow the attached debugger to debug python installs.
2 participants