-
Notifications
You must be signed in to change notification settings - Fork 242
Custom IP/Port fixes for xsbug on Windows #1376
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
base: public
Are you sure you want to change the base?
Conversation
I don't think this change is correct (though it probably does exactly what you want). We have to be careful because the Node-RED MCU editor plug-in really depends on this working in a specific way (and I broke that once!).
xsbug has a preference in the UI to set the port that it listens on. xsbug-log (currently) does not have a way to set the listening port. If we define a way to set the listening port, we can use that in both xsbug-log and xsbug. But, we will need to be explicit about what happens in xsbug if there is both a user preference set and the environment variable to avoid inconsistent behaviors. FWIW – It may be useful to understand the way Node-RED MCU editor works. It sets the cc: @ralphwetzel |
Thanks for the background. Since we can't set the command line options for I'm pretty sure the Windows build issue still needs to be addressed. The So as a proposal:
Thoughts? |
That seems like a good first step. And it could be all that is needed.
It looks like the embedded |
I'm back to looking at this, and I'm finding the current approach a little odd. Currently, if you set My thinking is that the makefiles should check if For I took a stab at this with the Windows simulator makefile (gist) and it's a really clean experience. By default it "just works" (except for port and I think this makes it much cleaner for remote, since you don't get an extra instance of |
Tested with latest Moddable and continues to work well for me. Any possibility to merge this? |
I understand you have a scenario you'd like to work and I support that, but it cannot be a breaking change,. xsbug does not take the port to listen on from the environment. It defaults the listening port to 5002 and allows it to be overridden by preferences which are set in the user interface. The Providing a port from the environment to
Agreed – there's no need to launch the debugger locally if it won't be used. To understand the concern with the Node-RED MCU Edition, perhaps some details will help. There are three pieces of software all running on the same computer:
In this scenario, xsbug listens on a different port than the one the host uses to connect to it. That works, thanks to the proxy, but it means that a single environment variable cannot be used to specify the port. |
Thank you for the detailed explanation of Node-RED and how it acts as a proxy. It was very helpful in understanding the port usage strategy. Given this, I now have
How is this attempt looking? Thanks! |
I think this is reasonable. It is focused, so there won't be surprise side effects. It shouldn't be necessary to set Thanks for sticking with this. The support for Node-RED MCU Edition is subtle, but it enables really amazing workflows in that environment (bi-directional communication between the Nodes on the device and Node-RED running in the browser) so I don't want to repress on that hard-won capability. |
Fixes the following issues to support custom IP/ports with
xsbug
on Windows:XSBUG_PORT
andXSBUG_HOST
environment variable support for Windows make (nmake.win.mk
)xsbug
innmake.esp32.mk
during pre-build soxsbug
can adopt the then-current host/portXSBUG_PORT
environment variable inxsbug-log