Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Unable to debug Wing inflights #5863

Closed
eladb opened this issue Mar 7, 2024 · 3 comments · Fixed by #5952
Closed

Unable to debug Wing inflights #5863

eladb opened this issue Mar 7, 2024 · 3 comments · Fixed by #5952
Assignees
Labels
🐛 bug Something isn't working 🎨 sdk SDK 🧪 testing

Comments

@eladb
Copy link
Contributor

eladb commented Mar 7, 2024

I tried this:

Debug a Wing application by attaching wing to a debugger and using the debugger keyword in JavaScript.

This happened:

Since #5554 it seems like if I attach a debugger to wing, it doesn't carry over to the child processes.

I expected this:

To work

Is there a workaround?

No response

Anything else?

No response

Wing Version

No response

Node.js Version

No response

Platform(s)

No response

Community Notes

  • Please vote by adding a 👍 reaction to the issue to help us prioritize.
  • If you are interested to work on this issue, please leave a comment.
@eladb eladb added the 🐛 bug Something isn't working label Mar 7, 2024
@monadabot monadabot added this to Wing Mar 7, 2024
@github-project-automation github-project-automation bot moved this to 🆕 New - not properly defined in Wing Mar 7, 2024
@eladb
Copy link
Contributor Author

eladb commented Mar 7, 2024

I believe passing --inspect to the child process should do the trick.

@eladb
Copy link
Contributor Author

eladb commented Mar 7, 2024

Confirmed that this is a result of #5554 by reverting locally.

@Chriscbr can you check this out and see how hard it is to support?

@staycoolcall911 staycoolcall911 moved this from 🆕 New - not properly defined to 🤝 Backlog - handoff to owners in Wing Mar 14, 2024
@MarkMcCulloh MarkMcCulloh self-assigned this Mar 14, 2024
@mergify mergify bot closed this as completed in #5952 Mar 15, 2024
mergify bot pushed a commit that referenced this issue Mar 15, 2024
This specifically fixes usage with vscode's js debugger. It's a hack but until we have a more robust answer to debugging it's probably worthwhile.

It's worth noting that you can also directly use `--inspect`, but you have to do it with `--inspect=0` because each inflight will need its own port. However, now that we're using child processes, vscode's debugging is the only one I've gotten to attach correctly (because it inserts a `--require` hook to start the inspector instead)

Fixes #5863

*By submitting this pull request, I confirm that my contribution is made under the terms of the [Wing Cloud Contribution License](https://github.com/winglang/wing/blob/main/CONTRIBUTION_LICENSE.md)*.
@github-project-automation github-project-automation bot moved this from 🤝 Backlog - handoff to owners to ✅ Done in Wing Mar 15, 2024
@monadabot
Copy link
Contributor

Congrats! 🚀 This was released in Wing 0.61.7.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐛 bug Something isn't working 🎨 sdk SDK 🧪 testing
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

4 participants