FeaturesPluginsDocs & SupportCommunityPartners

NetBeans Forums

 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
  

XDEBUG in NetBeans works !

 
Post new topic   Reply to topic    NetBeans Forums -> PHP Users
View previous topic :: View next topic  
Author Message
Husso



Joined: 12 Dec 2008
Posts: 2

PostPosted: Sat Dec 13, 2008 12:17 am    Post subject: XDEBUG in NetBeans works ! Reply with quote

XDEBUG in NetBeans works !


When I installed XAMP I see there are 2 php.ini files, once in
C:\xampp\apache\bin and once in
C:\xampp\php
What I modified the whole day was in C:\xampp\php which is NOT the right one
You have to modify php.ini in C:\xampp\apache\bin

AND

Do not forget to set Run As: Script(run in command line)
For this in NetBeans go to : Run->Set Project Configuration->Customise..
Here select: Run Configuration , Run As: Script(run in command line)

I you select Run As: Local web Site(running on local web server) what I did
it never works !!!!!


I found here the settings for php.ini and changed the paths accordingly
and XDEBUG worked !!!!

http://planetozh.com/blog/2006/04/profiling-php-scripts-with-xdebug/

or you can copy here:

zend_extension_ts = "C:\xampp\php\extensions\php_xdebug.dll"
[xdebug]
xdebug.auto_trace = 1
xdebug.collect_includes = 1
xdebug.collect_params = 1
xdebug.collect_return = 1
xdebug.default_enable = 1
xdebug.extended_info = 1
xdebug.show_local_vars = 0
xdebug.show_mem_delta = 1
xdebug.trace_format = 1
xdebug.trace_options = 0
xdebug.trace_output_dir ="C:\xampp\tmp"
; Remote
xdebug.remote_enable=1
xdebug.remote_mode="req"
xdebug.remote_host=127.0.0.1
xdebug.remote_port=17869
xdebug.idekey=<idekey>

; Mode 1
xdebug.remote_handler="gdb"
xdebug.auto_profile = 1
xdebug.auto_profile_mode = 2
xdebug.output_dir = "C:\xampp\tmp"

; Mode 2
xdebug.remote_handler="DBGp"
xdebug.profiler_enable = 1
xdebug.profiler_output_dir = "C:\xampp\tmp"
xdebug.profiler_output_name = "debug.out"

xdebug.dump.SERVER = REMOTE_ADDR,REQUEST_METHOD



good luck

Huseyin Altindag


[color=blue][/color]
Back to top
View user's profile Send private message
issin



Joined: 16 Dec 2008
Posts: 1

PostPosted: Tue Dec 16, 2008 8:08 am    Post subject: Reply with quote

If you run xampp, just edit C:\xampp\apache\bin\php.ini

------
[Zend]
;zend_extension_ts = "C:\xampp\php\zendOptimizer\lib\ZendExtensionManager.dll"
;add for XDebug
zend_extension_ts="C:\xampp\php\ext\php_xdebug.dll"
zend_extension_manager.optimizer_ts = "C:\xampp\php\zendOptimizer\lib\Optimizer"
zend_optimizer.enable_loader = 0
zend_optimizer.optimization_level=15
;zend_optimizer.license_path =
; Local Variables:
; tab-width: 4
; End:

[XDebug]
;; Only Zend OR (!) XDebug
;zend_extension_ts="C:\xampp\php\ext\php_xdebug.dll"
xdebug.remote_enable=true
xdebug.remote_host=127.0.0.1
xdebug.remote_port=9000
xdebug.remote_handler=dbgp
xdebug.profiler_enable=1
xdebug.profiler_output_dir="C:\xampp\tmp"
------

I don't know to work for zendOptimizer and XDebug, but work only for XDebug.
Back to top
View user's profile Send private message
neelu7779



Joined: 18 Dec 2008
Posts: 4

PostPosted: Fri Dec 19, 2008 4:46 am    Post subject: No its not working for me... Please help Reply with quote

Help
I am using xdebug. The file I have downloaded is php_xdebug-2.0.3-5.3.0.dll

It is in the following location "C:\PHP\ext"

Following are the settings in the php.ini

zend_extension_ts="C:/PHP/ext/php_xdebug-2.0.3-5.3.0.dll"

xdebug.remote_host="localhost"
xdebug.remote_port=9000
xdebug.remote_autostart=0
;xdebug.idekey=1
;xdebug.default_enable=off
;xdebug.profiler_output_dir="C:/PHP"
[xdebug]
xdebug.auto_trace = 1
xdebug.collect_includes = 1
xdebug.collect_params = 1
xdebug.collect_return = 1
xdebug.default_enable = 1
xdebug.extended_info = 1
xdebug.show_local_vars = 0
xdebug.show_mem_delta = 1
xdebug.trace_format = 1
xdebug.trace_options = 0
xdebug.trace_output_dir ="C:/PHP"
; Remote
xdebug.remote_enable=0
xdebug.remote_mode="req"
xdebug.idekey=<idekey>

; Mode 2
xdebug.remote_handler="dbgp"
xdebug.profiler_enable = 1
xdebug.profiler_output_name = "debug.out"
xdebug.dump.SERVER = REMOTE_ADDR,REQUEST_METHOD \

This is information about NetBeans
Product Version: NetBeans IDE Early Access for PHP (Build 200804221056)
Java: 1.6.0; Java HotSpot(TM) Client VM 1.6.0-b105
System: Windows XP version 5.1 running on x86; Cp1252; en_US (php)
Userdir: C:\Documents and Settings\nilu\.netbeans\6.1ea-php

Using PHP 5.
Apache 2.0


Now the problems:

Menu attach Debugger is still disabled or grayed out.

When I try to debug the break point is never hit. Scripts run like a normal.

following is the URL of I get when I click "Debug main project"

http://localhost/index.php?XDEBUG_SESSION_START=netbeans-xdebug

When I close the browser debugger does not stop. It shows the "waiting for connection" status.

When I click the stop debugging button in NetBeans gives a messagebox "There is no connection from xdebug detected with in some seconds" xdebug is not configured or xdebug is not installed.

Please guide me to resolve the above mentioned issues and debug the project.
Back to top
View user's profile Send private message
radek matous
Posted via mailing list.





PostPosted: Fri Dec 19, 2008 8:53 am    Post subject: XDEBUG in NetBeans works ! Reply with quote

neelu7779 wrote:
Hi,

definitely xdebug.remote_enable=1 is needed

Radek

Quote:
Help

I am using xdebug. The file I have downloaded is php_xdebug-2.0.3-5.3.0.dll



It is in the following location "C:\PHP\ext"



Following are the settings in the php.ini



zend_extension_ts="C:/PHP/ext/php_xdebug-2.0.3-5.3.0.dll"



xdebug.remote_host="localhost"

xdebug.remote_port=9000

xdebug.remote_autostart=0

;xdebug.idekey=1

;xdebug.default_enable=off

;xdebug.profiler_output_dir="C:/PHP"

[xdebug]

xdebug.auto_trace = 1

xdebug.collect_includes = 1

xdebug.collect_params = 1

xdebug.collect_return = 1

xdebug.default_enable = 1

xdebug.extended_info = 1

xdebug.show_local_vars = 0

xdebug.show_mem_delta = 1

xdebug.trace_format = 1

xdebug.trace_options = 0

xdebug.trace_output_dir ="C:/PHP"

; Remote

xdebug.remote_enable=0

xdebug.remote_mode="req"

xdebug.idekey=<idekey>



; Mode 2

xdebug.remote_handler="dbgp"

xdebug.profiler_enable = 1

xdebug.profiler_output_name = "debug.out"

xdebug.dump.SERVER = REMOTE_ADDR,REQUEST_METHOD \



This is information about NetBeans

Product Version: NetBeans IDE Early Access for PHP (Build 200804221056)

Java: 1.6.0; Java HotSpot(TM) Client VM 1.6.0-b105

System: Windows XP version 5.1 running on x86; Cp1252; en_US (php)

Userdir: C:\Documents and Settings\nilu\.netbeans\6.1ea-php



Using PHP 5.

Apache 2.0





Now the problems:



Menu attach Debugger is still disabled or grayed out.



When I try to debug the break point is never hit. Scripts run like a normal.



following is the URL of I get when I click "Debug main project"



http://localhost/index.php?XDEBUG_SESSION_START=netbeans-xdebug



When I close the browser debugger does not stop. It shows the "waiting for connection" status.



When I click the stop debugging button in NetBeans gives a messagebox "There is no connection from xdebug detected with in some seconds" xdebug is not configured or xdebug is not installed.



Please guide me to resolve the above mentioned issues and debug the project.










Back to top
neelu7779



Joined: 18 Dec 2008
Posts: 4

PostPosted: Mon Dec 22, 2008 7:54 am    Post subject: Thank you but still not working Reply with quote

Hi Radek,

Thank you for pointing out that. I tried that before posting on the forum but got same response. I tried it after your reply but it is not working. Infact, now it gives me an error

"Apache web server has encountered a problem and it needs to close."

Is there any thing needed to be done with the httpd.conf file of apache?
Please help me out.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    NetBeans Forums -> PHP Users All times are GMT
Page 1 of 1

 
Jump to:  
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
You can attach files in this forum
You can download files in this forum


Powered by phpBB