NuSphere Forums Forum Index
NuSphere Forums
Reply to topic
is debugger.port/debugger.host possible in dbg free version?


Joined: 12 Oct 2006
Posts: 9
Reply with quote
hiho@ll
i would need that the debugger automatically connects to a different host than standard (localhost:7869)
i know it works with DBGSESS arguments but i don't like that solution

so my question
how can i configure dbg to connect to a different host/port
i used:
debugger.port=34345
debugger.host=127.0.0.1

and it don't seem to work
btw: i'm using the free version

thx@ll
View user's profileFind all posts by thinkingSend private message
Site Admin

Joined: 13 Jul 2003
Posts: 8342
Reply with quote
Quote:
i know it works with DBGSESS arguments but i don't like that solution

but why?

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


Joined: 12 Oct 2006
Posts: 9
Reply with quote
cause this solution may be a security hole
cause debug sessions run through my server
if i don't need to use DBGSESSID arguments i can make it more secure

so my question: is it possible in the free verison? or does my config just don't work Wink
View user's profileFind all posts by thinkingSend private message
Site Admin

Joined: 13 Jul 2003
Posts: 8342
Reply with quote
free versions (2.15, 2.13 or 2.11) support JIT debugging. It's when debugger module initiates debug session and connects at the address specified in the settings. But they still support DBGSESSID and therefore debug session can be requested by everybody. I agree that it is not quite safe for public servers.

If you need IP-based security (it's when only specified hosts can start debugger), you'd check commercial version of debugger (3.0.6 at the moment).

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


Joined: 12 Oct 2006
Posts: 9
Reply with quote
i changed my config

Quote:

extension=dbg.so
debugger.enabled=on
debugger.profiler_enabled=on
debugger.JIT_enabled=on
debugger.JIT_host=127.0.0.1
debugger.JIT_port=3456


but dbg want's to connect to standard port 7869 on localhost which doesn't work
i just looked in the source code and i can't really find the problem to this like a typo or such
so why it's not working?
any hints?
btw: the extension is loaded and using DBGSESSID param it works
but why doesn't changing JIT port work?[/quote]
View user's profileFind all posts by thinkingSend private message
Site Admin

Joined: 13 Jul 2003
Posts: 8342
Reply with quote
JIT port/host are used for JIT sessions only. Latter happens only upon errors/warnings or notices when their level is higher than specified in debugger.JIT_level. That's the only purpose for JIT (which btw stands for "just in time", or debugging from the error point).

If you need IP-based security, try commercial version of debugger (3.1.6) that checks if requested address and port match allowed/denied lists in settings.

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


Joined: 12 Oct 2006
Posts: 9
Reply with quote
thx dmitri
seems i misunderstood JIT

but i have another question
if JIT debugging is "debugging in case of an error"
is it possible with DBG that i have a php code without any DebugBreak(); commands and using eclipse to make a breakpoint?

my problem currently is:
using DBGSESSID i can set to which host to connect, right?
using JIT config params i can set default values so i don't need DBGSESSID
BUT this would mean the config is only used in case of an error

currently i have problems with eclipse
cause it only starts debugging using DebugBreak();
and if i understand it correctly, this is how it works, right?
i mean, DBG only connects to eclipse, IF debugbreak occures OR and error

so if i want to debug the script from the first line, i have to use debugbreak
cause a breakpoint in eclipse can't work, because DBG only connects in case of error or debugbreak?

thx dmitri
View user's profileFind all posts by thinkingSend private message
Site Admin

Joined: 13 Jul 2003
Posts: 8342
Reply with quote
Quote:
is it possible with DBG that i have a php code without any DebugBreak(); commands and using eclipse to make a breakpoint?

Definitely, debugger itself supports it through its API. But finally functionality depends on the IDE.
Check out PhpED IDE and you'll see it supports breakpoints with no problems and with no modifications in the code.

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


Joined: 12 Oct 2006
Posts: 9
Reply with quote
when does DBG connect to the IDE? and which conditions affect this behaviour?
right after the script started?
on error? (JIT)
View user's profileFind all posts by thinkingSend private message
Site Admin

Joined: 13 Jul 2003
Posts: 8342
Reply with quote
You asked if that functionality (breakpoints) works without modification of code.
Sorry if I did not make it clear.
Yes, that functionality (breakpoints) works without modification of code.
It works by just placing breakpoints (red marks in most IDEs) and IT IS IDE that tells debugger where and how to set breakpoints and if it does this wrongly or does not do it at all they won't trigger.

We do support only NuSphere PhpED IDE and it is known to work great with breakpoints.

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


Joined: 12 Oct 2006
Posts: 9
Reply with quote
yeah, i'm working with eclipse and it seems there i have a little problem with the paths
which seems everyone has Wink

thx
View user's profileFind all posts by thinkingSend private message
Site Admin

Joined: 13 Jul 2003
Posts: 8342
Reply with quote
I would not expect a commercial quality from non-commercial products like php-eclipse. At least in long terms.

_________________
The PHP IDE team
View user's profileFind all posts by dmitriSend private messageVisit poster's website
is debugger.port/debugger.host possible in dbg free version?
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