Debugging OTRS3

English! place to talk about development, programming and coding
Post Reply
JoernWR
Znuny newbie
Posts: 18
Joined: 04 Mar 2011, 18:44
Znuny Version: 3.05

Debugging OTRS3

Post by JoernWR »

Hi all,

I have found EPIC for Eclipse as promising development tool for coding and debugging otrs.
Just as for Java (which is more my base :-) I can define different RUN- or DEBUG configurations.
I tried like this.

1. First did a normal OTRS3 install on my disk (windows).
2. Created a perl project in eclipse and importet just the OTRS\OTRS directory (which directly contains the KERNEL dir).
3. Created a RUN Configuration and startet the index.pl

Result was a response in the browser, saying that my browser is far too old and cannot be used :-) ups!

I am sure, I did something wrong configuring the environment, because I did not completly understand everthing yet.

Could anyone "help me on the horse" and give me some hints, about how to start this?
Maybe you use different dev-tools and would like to share your experience with me?

I am open minded, but need a solution, that alows me to start coding and debugging inside the app and not just with adding println.

Cheers,
Joern
Produktiv OTRS::ITSM 3.0.2 unter SLES10SP3, Testsystem OTRS3.2.6 with laatest ITSM
jojo
Znuny guru
Posts: 15020
Joined: 26 Jan 2007, 14:50
Znuny Version: Git Master
Contact:

Re: Debugging OTRS3

Post by jojo »

OTRS is a webbased software, so you'll need a webserver and at least a modern browser
"Production": OTRS™ 8, OTRS™ 7, STORM powered by OTRS
"Testing": ((OTRS Community Edition)) and git Master

Never change Defaults.pm! :: Blog
Professional Services:: http://www.otrs.com :: enjoy@otrs.com
JoernWR
Znuny newbie
Posts: 18
Joined: 04 Mar 2011, 18:44
Znuny Version: 3.05

Re: Debugging OTRS3

Post by JoernWR »

Hi,

ok, that is clear - I certainly have a running and well configured Apache2 and a MySQL database connected.
In EPIC you can define with which browser you want to run it, but even with my latest Mozilla I receive this message.

Thats why I am sure, that my runtime config cannot be right.

If you know the EPIC plugin, it would be nice, if you gave me a hint for this configuration (especially what to choose as the HTML document root).
If you do not use Eclipse/EPIC, I would be interested in which development tools you use and how you accomplish tasks like remote debugging with it.

Cheers,
Joern
Produktiv OTRS::ITSM 3.0.2 unter SLES10SP3, Testsystem OTRS3.2.6 with laatest ITSM
jojo
Znuny guru
Posts: 15020
Joined: 26 Jan 2007, 14:50
Znuny Version: Git Master
Contact:

Re: Debugging OTRS3

Post by jojo »

have a look at http://source.otrs.org/viewvc.cgi/Fred/ which is used as debugging module in OTRS
"Production": OTRS™ 8, OTRS™ 7, STORM powered by OTRS
"Testing": ((OTRS Community Edition)) and git Master

Never change Defaults.pm! :: Blog
Professional Services:: http://www.otrs.com :: enjoy@otrs.com
Daniel Obee
Moderator
Posts: 644
Joined: 19 Jun 2007, 17:11
Znuny Version: various
Real Name: Daniel Obée
Location: Berlin

Re: Debugging OTRS3

Post by Daniel Obee »

I remember there was a bug in the first 3.0 releases that caused the system not to accept any browser at all. Just google/forum search the error message. There should be something.

Greets
Dan
Daniel Obee
Moderator
Posts: 644
Joined: 19 Jun 2007, 17:11
Znuny Version: various
Real Name: Daniel Obée
Location: Berlin

Re: Debugging OTRS3

Post by Daniel Obee »

scareface
Znuny newbie
Posts: 19
Joined: 22 Nov 2011, 09:05
Znuny Version: 3.1.7

Re: Debugging OTRS3

Post by scareface »

Hallo Community,

I tried to configure a development environment on Windows XP like JoernWR. And I'm not able to get it running.

Here some facts about my environment
OTRS Setup: otrs-3.0.11-win-installer-2.4.4.exe in C:\Programme\OTRS\
Kernel directory: C:\Programme\OTRS\OTRS\Kernel

IDE: Eclipse with EPIC Plugin

Run-Configuration EPIC Tab "Web Server":
HTML Root Directory: C:\Programme\OTRS\OTRS\var\httpd\htdocs
HTML Startup File: C:\Programme\OTRS\OTRS\var\httpd\htdocs\index.html
CGI Root Directory: C:\Programme\OTRS\OTRS\bin\cgi-bin

My problem is, that the integrated webserver of Eclipse or EPIC (I don't know exactly) isn't able to deal with Apache Alias and ScriptAlias.

Witch environment are you using?
Or where you able to get EPIC running?
If yes, how?

Any help would be nice.

Regards
scareface

P.S. the log

Code: Select all

Found default config file
Server started on 5003
LOG: 5 5003-server: main.: starting handler: cgi
LOG: 5 5003-server: main.: starting handler: file
LOG: 4 5003-server: 127.0.0.1: new connection
LOG: 3 5003-127.0.0.1-0: Request 24 GET /index.html HTTP/1.1
LOG: 5 5003-127.0.0.1-0: main.: invoking handler: cgi
LOG: 5 5003-127.0.0.1-0: suffix=.pl root=C:/Programme/OTRS/OTRS/bin/cgi-bin url: /index.html
LOG: 5 5003-127.0.0.1-0: Checking for suffix: .pl
LOG: 5 5003-127.0.0.1-0: looking for: C:\Programme\OTRS\OTRS\bin\cgi-bin\index.html.pl
LOG: 5 5003-127.0.0.1-0: main.: invoking handler: file
LOG: 5 5003-127.0.0.1-0: file.: Looking for file: (C:/Programme/OTRS/OTRS/var/httpd/htdocs)(\index.html)
LOG: 3 5003-127.0.0.1-0: request done
LOG: 3 5003-127.0.0.1-0: Request 23 GET /otrs/index.pl HTTP/1.1
LOG: 5 5003-127.0.0.1-0: main.: invoking handler: cgi
LOG: 5 5003-127.0.0.1-0: suffix=.pl root=C:/Programme/OTRS/OTRS/bin/cgi-bin url: /otrs/index.pl
LOG: 5 5003-127.0.0.1-0: Checking for suffix: .pl
LOG: 5 5003-127.0.0.1-0: looking for: C:\Programme\OTRS\OTRS\bin\cgi-bin\otrs.pl
LOG: 5 5003-127.0.0.1-0: looking for: C:\Programme\OTRS\OTRS\bin\cgi-bin\otrs\index.pl
LOG: 5 5003-127.0.0.1-0: main.: invoking handler: file
LOG: 5 5003-127.0.0.1-0: file.: Looking for file: (C:/Programme/OTRS/OTRS/var/httpd/htdocs)(\otrs\index.pl)
LOG: 4 5003-127.0.0.1-0: file.: no such file: C:\Programme\OTRS\OTRS\var\httpd\htdocs\otrs\index.pl
LOG: 3 5003-127.0.0.1-0: Error: 404 Not Found: /otrs/index.pl
LOG: 3 5003-127.0.0.1-0: request done
LOG: 4 5003-127.0.0.1-0: socket close
LOG: 4 5003-server: 127.0.0.1: new connection
LOG: 3 5003-127.0.0.1-1: Request 24 GET /otrs/index.pl HTTP/1.1
LOG: 5 5003-127.0.0.1-1: main.: invoking handler: cgi
LOG: 5 5003-127.0.0.1-1: suffix=.pl root=C:/Programme/OTRS/OTRS/bin/cgi-bin url: /otrs/index.pl
LOG: 5 5003-127.0.0.1-1: Checking for suffix: .pl
LOG: 5 5003-127.0.0.1-1: looking for: C:\Programme\OTRS\OTRS\bin\cgi-bin\otrs.pl
LOG: 5 5003-127.0.0.1-1: looking for: C:\Programme\OTRS\OTRS\bin\cgi-bin\otrs\index.pl
LOG: 5 5003-127.0.0.1-1: main.: invoking handler: file
LOG: 5 5003-127.0.0.1-1: file.: Looking for file: (C:/Programme/OTRS/OTRS/var/httpd/htdocs)(\otrs\index.pl)
LOG: 4 5003-127.0.0.1-1: file.: no such file: C:\Programme\OTRS\OTRS\var\httpd\htdocs\otrs\index.pl
LOG: 3 5003-127.0.0.1-1: Error: 404 Not Found: /otrs/index.pl
LOG: 3 5003-127.0.0.1-1: request done
LOG: 4 5003-127.0.0.1-1: socket close
OTRS: 3.1.7 (Test) 3.1.7(Prod)
OS: CentOS
Web/DB: Apache2/MySQL 5 ? MSSQL
jojo
Znuny guru
Posts: 15020
Joined: 26 Jan 2007, 14:50
Znuny Version: Git Master
Contact:

Re: Debugging OTRS3

Post by jojo »

Hi,

I'm developing with vi on Linux using Apache
"Production": OTRS™ 8, OTRS™ 7, STORM powered by OTRS
"Testing": ((OTRS Community Edition)) and git Master

Never change Defaults.pm! :: Blog
Professional Services:: http://www.otrs.com :: enjoy@otrs.com
scareface
Znuny newbie
Posts: 19
Joined: 22 Nov 2011, 09:05
Znuny Version: 3.1.7

Re: Debugging OTRS3

Post by scareface »

jojo wrote:Hi,
I'm developing with vi on Linux using Apache
And how do you debug or "look into" variables at lifetime of them?
OTRS: 3.1.7 (Test) 3.1.7(Prod)
OS: CentOS
Web/DB: Apache2/MySQL 5 ? MSSQL
jojo
Znuny guru
Posts: 15020
Joined: 26 Jan 2007, 14:50
Znuny Version: Git Master
Contact:

Re: Debugging OTRS3

Post by jojo »

Printing them to the logfile or stdout
"Production": OTRS™ 8, OTRS™ 7, STORM powered by OTRS
"Testing": ((OTRS Community Edition)) and git Master

Never change Defaults.pm! :: Blog
Professional Services:: http://www.otrs.com :: enjoy@otrs.com
jojo
Znuny guru
Posts: 15020
Joined: 26 Jan 2007, 14:50
Znuny Version: Git Master
Contact:

Re: Debugging OTRS3

Post by jojo »

you can also use FRED
"Production": OTRS™ 8, OTRS™ 7, STORM powered by OTRS
"Testing": ((OTRS Community Edition)) and git Master

Never change Defaults.pm! :: Blog
Professional Services:: http://www.otrs.com :: enjoy@otrs.com
scareface
Znuny newbie
Posts: 19
Joined: 22 Nov 2011, 09:05
Znuny Version: 3.1.7

Re: Debugging OTRS3

Post by scareface »

Thank you for reply.

I'm new to OTRS and Perl too. A print $Self or something else causes a Server Error 500.
I'm looking for a simple way to take a look into Variables like a messagebox in VBScript or a real debugger.

Is this possiple? Is ther any way to do so?

With FRED I can look into Env an Session variables but not in the hole $Self in different modules like TicketAgentPhone.pm or core modules like Ticket.pm.
It is quite hard to understand parameter transfer between modules whithout monitoring during runtime.
jojo wrote:Printing them to the logfile or stdout
How do you print variables to STOUT and more important where is this displayed?

Code: Select all

print STOUT $Self ?
Regards
Scareface
OTRS: 3.1.7 (Test) 3.1.7(Prod)
OS: CentOS
Web/DB: Apache2/MySQL 5 ? MSSQL
jojo
Znuny guru
Posts: 15020
Joined: 26 Jan 2007, 14:50
Znuny Version: Git Master
Contact:

Re: Debugging OTRS3

Post by jojo »

you should ask some PERL Developers for this.... I'm printing only the variables I need (mostly via the log handler of OTRS)
"Production": OTRS™ 8, OTRS™ 7, STORM powered by OTRS
"Testing": ((OTRS Community Edition)) and git Master

Never change Defaults.pm! :: Blog
Professional Services:: http://www.otrs.com :: enjoy@otrs.com
scareface
Znuny newbie
Posts: 19
Joined: 22 Nov 2011, 09:05
Znuny Version: 3.1.7

Re: Debugging OTRS3

Post by scareface »

Thank you. jojo

If anybody has some additional hints, would be nice to share them. :-)
OTRS: 3.1.7 (Test) 3.1.7(Prod)
OS: CentOS
Web/DB: Apache2/MySQL 5 ? MSSQL
Post Reply