NuSphere Forums Forum Index
NuSphere Forums
Reply to topic
Step Debugging - Xdebug Listen / breakpntt: nav extrnl brwsr


Joined: 13 Oct 2022
Posts: 5
Reply with quote
what I really want to do is the "Listen" (e.g. Listen for Xdebug), where I can open the http addr, and the IDE will respond with designated breakpoints (as set in a single file, in the IDE) as I navigate to the potentially problematic code in my web browser user agent of choice. (i hope that makes sense).

I know i've done that before, where the http will seem as if the page stops loading, and i go to the IDE (not necessarily NuSphere), and the debugger is paused at the breakpoint. that's what I want to do.

Is that an option?

~~~

I'm dev'g a WordPress plugin. So, what's at issue is if I want to step debug with all required includes etc, I have to start at ./webroot/index.php - and that requires like 10000 steps to get to where I want to examine code. takes forever to get to the plugin functions if the IDE doesn't "listen" and pause only at a breakpoint. I expect readers know what I mean. any project w/ a lot of code would be like that.
View user's profileFind all posts by ajaxStardustSend private message
Site Admin

Joined: 13 Jul 2003
Posts: 8260
Reply with quote
If web server runs a script in response to URL and the script stops execution and turns into listening state in attempt to wait for the IDE, such web server will easily clutter your server with script instances all waiting for the IDE -- the more customers open the URL the more scripts will turn into waiting. It does not make much sense, at least not for production or semi-production environments.
We have implemented this differently -- the script initiates debug connection toward the IDE and it's IDE is listening for the debug sessions.
As of what you need as a feature -- sure, it's supported -- once the script connected the the IDE, latter will set breakpoints and let you continue execution in debugger. Script can initiate debug session in 3 cases -- if it is explicitly requested to do so with DEBGSESSID variable in request, upon error, if this trigger is enabled, and on DebugBreak() function call. I think these 3 cases cover what you need.

_________________
The PHP IDE team
View user's profileFind all posts by dmitriSend private messageVisit poster's website


Joined: 13 Oct 2022
Posts: 5
Reply with quote
Yes. Thank you. Your summary explains it well.
View user's profileFind all posts by ajaxStardustSend private message


Joined: 13 Oct 2022
Posts: 5
Reply with quote
dmitri wrote:
It does not make much sense, at least not for production or semi-production environments.

Why would ANYONE be running this IDE in a production environment?

You seriously feel a need to address that?
View user's profileFind all posts by ajaxStardustSend private message


Joined: 30 May 2006
Posts: 86
Reply with quote
ajaxStardust wrote:
dmitri wrote:
It does not make much sense, at least not for production or semi-production environments.

Why would ANYONE be running this IDE in a production environment?

You seriously feel a need to address that?


Yes, IDE is never supposed for use in production.
Otherwise it would be very unprofessional & probably first time in my 20 yrs experience .. not to mention VERY dangerous for your users - it would be like developing eshop in front of buying customers, right?


Last edited by lubosdz on Wed Oct 19, 2022 4:10 pm; edited 1 time in total
View user's profileFind all posts by lubosdzSend private message
Site Admin

Joined: 13 Jul 2003
Posts: 8260
Reply with quote
Never say never. It depends. Right, it's appropriate to have dedicated environments for development purposes and I would not encourage anyone to install debugger in production, but it does not mean it's impossible and absolutely dangerous. Quite the opposite -- I saw this more than once last 21 years -- the life time of dbg debugger. It helped developers track down issues and I got many positive feedbacks.

_________________
The PHP IDE team
View user's profileFind all posts by dmitriSend private messageVisit poster's website
Step Debugging - Xdebug Listen / breakpntt: nav extrnl brwsr
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
All times are GMT - 5 Hours  
Page 1 of 1  

  
  
 Reply to topic