ActiveState Community

Remote debugging

Posted by srabol on 2009-03-17 11:16

Hi

I've been away for some time but would give Komodo 5.1 a try :)

Remote debugging does not seem to work, or I misunderstand the term 'remote'

Setup:

W2k server with MySQL, and Apache 2.2, PHP V5.2.9-1 (Server API:Apache 2.0 Handler)

phpinfo() shows that xdebug is installed, and adding XDEBUG_SESSION_START=1 to a URL also triggers Komodo but that's it, nothing happens in Komodo.

The project is located at a share \www\1-4all\dev.

Another thing: Why is it not possible to specify the URL for the project?

E.g. something like http://dev.1-4-all.local and then when hitting 'debug' it would automatically be something like http://dev.1-4-all.local/index.php?XDEBUG_SESSION_START=1

I'm pretty sure that the above is a configuration issue, so any advice would be nice before I file a bug report.

Thanks in advance.

Best
Steen

toddw | Tue, 2009-03-17 11:23

If Komodo's debugger engine is triggering (connected to from Xdebug), then your most of the way there. Here are some things to try to get the file opening working. In your Komodo preferences:

  • set "Debugger->Initial break behaviour" pref to "Break on first executable line"
  • remove any "Mapped URIs" you have setup (or rename them so there is no possible filename conflict)
  • if the above two things fail to help, try setting "Debugger->Try to find files on the local system when remote debugging" to false

If all of the above tweaks fail to remedy the problem, check the Komodo log files to see if there are any errors:
http://community.activestate.com/faq/komodo-file-locations#log_files

Cheers,
Todd

srabol | Tue, 2009-03-17 11:44

Sorry but none of your suggestions helped.

Just to make sure that we are on the same page:

The server si configured as I have described in my initial post

the virtual host have this .htaccess
#.htaccess - file
#-------------------------------#
# xDebug section #
#-------------------------------#
php_value xdebug.remote_enable 1
php_value xdebug.remote_handler dbgp
php_value xdebug.remote_host 192.168.0.13
#;if debugging on remote server, put client IP here
#;;
php_value xdebug.allowed_clients 192.168.0.13
php_value xdebug.remote_port 9000
php_value xdebug.remote_mode req

# profiler
#php_value xdebug.profiler_enable_trigger 1
#php_value xdebug.profiler_enable 0
#php_value xdebug.profiler_output_dir \"/data_lokal/temp/xdebug/profiling\"

and Komodo is running on my laptop (192.168.0.13)

Here is the log entry:
[2009-03-17 19:36:08,148] [ERROR] DBG_Manager:
-- EXCEPTION START --
+ message (string) 'session is null'
+ fileName (string) 'chrome://komodo/content/debugger/debugger.js'
+ lineNumber (number) 472
+ stack (string) '([object XPCWrappedNative_NoHelper])@chrome://komodo/content/debugger/debugger.js:472
([object XPCWrappedNative_NoHelper],"debugger_init","")@chrome://komodo/content/debugger/debugger.js:697
'
+ name (string) 'TypeError'
*
([object XPCWrappedNative_NoHelper])@chrome://komodo/content/debugger/debugger.js:472
([object XPCWrappedNative_NoHelper],"debugger_init","")@chrome://komodo/content/debugger/debugger.js:697
-- EXCEPTION END --

toddw | Tue, 2009-03-17 11:53

Is there more in the Komodo error log? It seems as though there should be other exception messages before the above log entry occurs.

srabol | Tue, 2009-03-17 12:00

Here is the complete log:

C:\Program Files (x86)\ActiveState Komodo IDE 5\lib\mozilla\python\komodo\twisted\cred\identity.py:23: DeprecationWarning: the md5 module is deprecated; use hashlib instead
  import md5, types, sys, warnings
[2009-03-17 18:27:29,753] [ERROR] ko.main: 
-- EXCEPTION START --
+ message (string) 'window._koNum is undefined'
+ fileName (string) 'chrome://komodo/content/library/history.js'
+ lineNumber (number) 106
+ stack (string) '()@chrome://komodo/content/library/history.js:106
onloadDelay(0)@chrome://komodo/content/komodo.js:324
'
+ name (string) 'TypeError'
*
()@chrome://komodo/content/library/history.js:106
onloadDelay(0)@chrome://komodo/content/komodo.js:324
-- EXCEPTION END --

[2009-03-17 18:28:02,256] [WARNING] history: cannot get current location for 'startpage' view: [object XULElement]
[2009-03-17 18:34:02,463] [ERROR] DBG_Manager: 
-- EXCEPTION START --
+ message (string) 'ko.dbg.tabManager is null'
+ fileName (string) 'chrome://komodo/content/debugger/debugger.js'
+ lineNumber (number) 283
+ stack (string) 568 chars
+ name (string) 'TypeError'
*
()@chrome://komodo/content/debugger/debugger.js:283
(4,2)@chrome://komodo/content/debugger/debugger.js:2078
(4)@chrome://komodo/content/debugger/debugger.js:524
()@chrome://komodo/content/debugger/debuggerController.js:174
("cmd_dbgGo")@chrome://xtk/content/controller.js:61
doCommand("cmd_dbgGo")@:0
command_doCommand("cmd_dbgGo")@chrome://komodo/content/library/commands.js:248
debugger_doCommand("cmd_dbgGo",[object XULCommandEvent])@chrome://komodo/content/debugger/debuggerController.js:31
oncommand([object XULCommandEvent])@chrome://komodo/content/komodo.xul:1
-- EXCEPTION END --

[2009-03-17 18:34:02,463] [ERROR] ko.dbg.invocation: 
-- EXCEPTION START --
+ message (string) 'session is null'
+ fileName (string) 'chrome://komodo/content/debugger/debugger.js'
+ lineNumber (number) 2099
+ stack (string) 516 chars
+ name (string) 'TypeError'
*
(4,2)@chrome://komodo/content/debugger/debugger.js:2099
(4)@chrome://komodo/content/debugger/debugger.js:524
()@chrome://komodo/content/debugger/debuggerController.js:174
("cmd_dbgGo")@chrome://xtk/content/controller.js:61
doCommand("cmd_dbgGo")@:0
command_doCommand("cmd_dbgGo")@chrome://komodo/content/library/commands.js:248
debugger_doCommand("cmd_dbgGo",[object XULCommandEvent])@chrome://komodo/content/debugger/debuggerController.js:31
oncommand([object XULCommandEvent])@chrome://komodo/content/komodo.xul:1
-- EXCEPTION END --

landover123 | Tue, 2009-03-17 17:30

Yeah, I was going to ask about exception messages, too.

Landover Baptist Church

toddw | Tue, 2009-03-17 12:09

The main problem is the first error:
'window._koNum is undefined'

This error has stopped Komodo from starting up correctly, so the debugger component is not fully initialized. This was logged as the following bug:
http://bugs.activestate.com/show_bug.cgi?id=82323

There are two possible workarounds:

1) Install a Komodo IDE nightly build that will contain a fix:
http://downloads.activestate.com/Komodo/nightly/komodoide/latest-trunk/

2) Set the Komodo "Projects and Workspace->When starting Komodo" preference to "Ask...", restart Komodo and then allow the restore workspace to do it's thing and all should be well.

Cheers,
Todd

srabol | Wed, 2009-03-18 12:20

Option 1 did not work, I might try option 2 later

I have uninstalled the beta version due to the EXTREME resource usage
30-40% CPU usage and 140++MB memory, it's simply too much.

I know it's a beta product, but anyway..

Sorry for wasting your time.

Cheers,
Steen