Giter Site home page Giter Site logo

geben-on-emacs's Introduction

GEBEN-0.26 (Beta)
-----------------

GEBEN is a software package that interfaces Emacs to DBGp protocol
with which you can debug running scripts interactive. At this present
DBGp protocol are supported in several script languages with help of
custom extensions.

 * PHP with Xdebug 2.0.*
 * Perl, Python, Ruby and Tcl with Komodo Debugger Extensions

Currently GEBEN implements the following features.

 * continuation commands: run/stop/step-in/step-over/step-out
 * set/unset/listing breakpoints
 * expression evaluation
 * STDOUT/STDERR redirection
 * backtrace listing
 * variable inspection


REQUIREMENTS
------------

[server side]
 - DBGp protocol enabled script engine, like:
   - PHP with Xdebug
   - Python with Komode Debugger Extension
   - etc.

[client side]
 - Emacs22.1 or later


BIG CHANGES
-----------

- Since version 0.20 GEBEN does not require an external DBGp client
  program `debugclient'.

- At version 0.18 GEBEN dropped Emacs 21.4.

- Since version 0.1 GEBEN does not depend on CEDET emacs library.
  If you have installed CEDET previously only for GEBEN-pre-alpha,
  you can uninstall CEDET if you want.

- Now GEBEN lisp package forms a monolithic file.
  If you have installed previous version, you should remove all of old
  GEBEN files from installation directory.


INSTALLATION
------------

[server side]

- To debug PHP scripts, you'll need to install PHP, Xdebug and
  optionally a web server.  Please visit their official sites to get
  packages and instructions of installation and configuration.
  PHP:    http://php.net
  Xdebug: http://xdebug.org

- To debug Perl, Python, Ruby and Tcl with GEBEN, Komodo
  Debugging Extensions will give you a big help.
  Distribution: http://aspn.activestate.com/ASPN/Downloads/Komodo/RemoteDebugging
  Documentation: http://aspn.activestate.com/ASPN/Reference/Products/Komodo/komodo-doc-debugger.html

[client side]

1. Unpack GEBEN source code package and change directory to the
   unpacked directory.

<With GNU make command>
a. run `make'(or `gmake', depends on your environment).
b. If you are an administrator, Run: sudo make install
b' Or Run: SITELISP=$HOME/path/to/install make install

<Without GNU make command>
a. Byte compile 'dbgp.el'.
b. Byte compile `geben.el'.
c. Copy `dbgp.elc', `geben.elc' and entire `tree-widget' directory to
   any directory where Emacs can find.(Or add the path to `load-path'
   list)

<common>
2. Insert autoload hooks into your .Emacs file.
    -> (autoload 'geben "geben" "PHP Debugger on Emacs" t)
3. Restart Emacs.


DEBUGGING
---------

Here is an illustration on PHP debugging.

1. Run Emacs.

2. Start geben, type: M-x geben

3. Access to the target PHP script page with any browser.
   You may need to add a query parameter `XDEBUG_SESSION_START' if you
   configured Xdebug to require manual trigger to start a remote
   debugging session.
   e.g.) http://www.example.com/test.php?XDEBUG_SESSION_START=1

4. Soon the server and GEBEN establish a debugging session
   connection. Then Emacs loads the script source code of the entry
   page in a buffer.

5. Now the buffer is under the minor-mode 'geben-mode'.
   You can control the debugger with several keys.

     spc     step into/step over
     i       step into
     o       step over
     r       step out
     g       run
     c       run to cursor
     b       set a breakpoint at a line
     B       set a breakpoint interactively
     u       unset a breakpoint at a line
     U       clear all breakpoints
     \C-c b  display breakpoint list
     >       set redirection mode
     \C-u t  change redirection mode
     d       display backtrace
     t       display backtrace
     v       display context variables
     \C-c f  visit script file
     w       where
     q       stop

   When you hit any unbound key of `geben-mode', GEBEN will ask you to
   edit the original script file. Say yes and GEBEN will attempts to
   load the script file via `TRAMP'.

6. If you felt you'd debugged enough, it's time to quit GEBEN.
   To quit GEBEN, type: M-x geben-end

Known Issues
------------

* This version is not tested with Xdebug 2.1.* yet.

* There are some issues related Xdebug, version of at least 2.0.3.

  - Xdebug does not support STDERR command feature so that STDERR
    redirection feature does not work expectedly.

  - Xdebug does not implement `dbgp:' scheme feature so that with
    `step-in' command into a lambda function (you can create it with
    `create_function' in PHP) the cursor position is located at
    invalid line.

  - Xdebug may tell invalid line number on breaking by `return' type
    breakpoint. To this case GEBEN indicates the cursor at the top of
    the file in where the current breakpoint exists.

  - Xdebug unexpectedly breaks on returning from class/instance method
    if there is a `call' type breakpoint to the method.

  - If Xdebug is not loaded not as `zend_extension', some feature do
    not work as expectedly (e.g. step_into).
    

SUPPORT
-------

We all time need your supports - bug reports, feature requests,
code/documents/design contributions, and donations.
To submit one or more of them, please visit our web site.

 http://code.google.com/p/geben-on-emacs/

Also there are mailinglists.

For usage questions:
 http://groups.google.com/group/geben-users

For package contributions:
 http://groups.google.com/group/geben-dev

Your posts will make GEBEN development progress.

Thank you.

--

reedom <[email protected]>

geben-on-emacs's People

Contributors

tekai avatar

Watchers

 avatar  avatar

geben-on-emacs's Issues

Opening context window replaces trace window

What steps will reproduce the problem?
1. start single stepping in an emacs frame vertically divided
2. view context
3. context window will open in trace window, replacing it

What is the expected output? What do you see instead?
What I want to see is an intelligent algorithm to open another window for 
context display.
What I get is a context display where the stepping output is.

What version of the product are you using? On what operating system?
Latest geben as of today, Emacs 21 on Mac OSX



Original issue reported on code.google.com by [email protected] on 29 Jul 2010 at 4:53

feature request: interact command

DBGp protocol specification specifies `eval' and 'interact' commands
with which users can evaluate some code snippet in a debugging session.

GEBEN supports `eval' but doesn't `interact'.
Since the Python debugger extension of ActiveState doesn't support `eval' but 
do `eval', it requires GEBEN to implement `interact' command.

Original issue reported on code.google.com by [email protected] on 8 Jul 2009 at 4:39

Geben Causes issues With Other Emacs Packages

What steps will reproduce the problem?
1. (require 'geben)
2. M-x erc
3. Supply values to logon to IRC

What is the expected output? What do you see instead?
The expected output should be a successful logon to IRC.
Instead the message below is shown:

Connecting to irc.freenode.net:6667... 
open-network-stream: Wrong type argument: bufferp, nil

What version of the product are you using? On what operating system?
0.24 on Mac OS 10.6.8

Please provide any additional information below.

Here is a backtrace:
Debugger entered--Lisp error: (wrong-type-argument bufferp nil)
  buffer-local-value(dbgp-buffer-process nil)
  open-network-stream("erc-irc.freenode.net-6667" nil "irc.freenode.net" 6667)
  erc-server-connect("irc.freenode.net" 6667 #<buffer irc.freenode.net:6667>)
  erc-open("irc.freenode.net" 6667 "carbon99" "unknown" t nil)
  erc(:server "irc.freenode.net" :port 6667 :nick "carbon99" :password nil)
  call-interactively(erc t nil)
  execute-extended-command(nil)
  call-interactively(execute-extended-command nil nil)

Original issue reported on code.google.com by [email protected] on 9 Jul 2012 at 1:34

Geben hangs on inspecting variables

What steps will reproduce the problem?
1. Try to debug XQuery in existDB according to 
http://demo.exist-db.org/debugger.xml
2. Press v to see debugging context

What is the expected output? What do you see instead?
Expect to see variables ect. in the context area.
Instead: Geben hangs with the following output in the context area:
Where:    (loading...)                                                          

[X] Local
[X] Global
[X] Class


What version of the product are you using? On what operating system?

Ubuntu 10.10 i386, eXist-DB 1.4, emacs (both Ubuntu's 23.1.1 and vanilla 
23.3.1), geben (both trunk and 0.26)

Please provide any additional information below.


Original issue reported on code.google.com by [email protected] on 15 Mar 2011 at 2:55

Local variables not displaying values in context mode

What steps will reproduce the problem?
1. Install geben + xdebug on Ubuntu 10.04
2. Open Emacs, and enter geben mode
3. Start stepping through some code
4. Enter geben context mode

What is the expected output? What do you see instead?
Expected output would be to have the local variable values. Instead, local
variables that are clearly defined in the code, display an 'undef' value.

What version of the product are you using? On what operating system?

Using latest version (0.26) and Emacs 23.1.1 on Ubuntu 10.04 (Lucid Lynx).


Please provide any additional information below.

This was working fine for me on the previous version of Ubuntu. I've tried
completely re-installing geben, with no luck


Original issue reported on code.google.com by [email protected] on 18 May 2010 at 9:08

Attachments:

not finding debugclient

What steps will reproduce the problem?
1. Mx geben
2.
3.

What is the expected output? What do you see instead?
should take me into geben. I see the error message "searching for program:
no such file or directory, debugclient"

What version of the product are you using? On what operating system?
0.19 , arch-Linux kernel - 2.6.27

Please provide any additional information below.
debugclient is in suggested directory, /usr/local/bin.

Original issue reported on code.google.com by [email protected] on 12 Dec 2008 at 7:18

README installation instructions improvements

Client side installation fails if emacs can not find 'dbgp.elc'.
Steps should read:

<Without GNU make command>
a. Byte compile 'dbgp.el'.
b. Copy `dbgp.elc' to any directory where Emacs can find
c. Byte compile `geben.el'.
d. Copy `geben.elc' and entire `tree-widget' directory to
   any directory where Emacs can find.(Or add the path to `load-path'
   list)

Also, https://code.google.com/p/geben-on-emacs/wiki/JaInstalling  should 
mention that Windows installation is possible (without GNU make).

Original issue reported on code.google.com by [email protected] on 11 Sep 2013 at 11:56

ignore-files?

What steps will reproduce the problem?
1. Start geben on a php project with frequent periodical Ajax calls

What is the expected output? What do you see instead?

Debug process start, I hit 'q', it respawn, I hit 'q', it respawn and so on

What version of the product are you using? On what operating system?
$Id: geben.el 118 2010-03-30 10:26:39Z fujinaka.tohru $
Emacs 23.1.1

Please provide any additional information below.

This is more a feature request than a bug.
I would like something like an "ignore-files" list where I could specify files 
or uri that I don't want to profile

Thanks!

Original issue reported on code.google.com by [email protected] on 30 Jun 2010 at 4:20

GEBEN with nXhtml : "Buffer is read only"

What steps will reproduce the problem?
1. Install GEBEN + Xdebug + nXhtml
2. Open Emacs, and start GEBEN (M-x geben)
3. Start stepping through some code mixing PHP/HTML and starting with HTML 
code. For example : a blank line before the opening PHP tag '<?php'.
4. Pressing debugger keys such as 'o' (geben-step-over) or other control key

What is the expected output? What do you see instead?
Expected outcome would be to control the debugger. Instead, pressing control 
key seems to want to edit the buffer (which is read only, because it is under 
the debugger) and nothing happens. If we press any unbound key of `geben-mode', 
expected output would be: "The buffer is under debug mode. Want to open the 
original file? (y/N)". Instead, we got the mesage "Buffer is read only" in the 
minibuffer.

What version of the product are you using? On what operating system?
Using latest version (0.26), nxhtml 2.08-100425, and Emacs 23.2.1 on GNU/Linux. 
Also tried with latest GEBEN SVN revision (r121).

Please provide any additional information below.
It works if the script starts with the opening PHP tag, even if it contains 
also HTML further.

The same bug is reported in nxhtml launchpad :
http://bugs.launchpad.net/nxhtml/+bug/600601

Original issue reported on code.google.com by [email protected] on 15 Aug 2010 at 1:44

Attachments:

When drilling down into nested objects it stops at CLASSNAME instead of showing the data

What steps will reproduce the problem?
1. start debugging a program
2. type 'v' for geben-display-context
3. click + signs to drill-down into Local variables/objects

What is the expected output? What do you see instead?
I should be able to drill-down deep into the objects and see the data values. 
Instead it stops after the first object and shows CLASSNAME

What version of the product are you using? On what operating system?
geben 0.26
emacs 23.2.1
xdebug-2.1.0RC1
Linux ubuntu

Please provide any additional information below.

For example the 'this' object is usually pretty large and by clicking 
drill-down (plus sign) in the context window I could not get past the second 
object before seeing "CLASSNAME" entries that hide the data I want to see.

I noticed that the command issued by geben was pulling bad results because of 
the page argument:
(cmd) property_get -i 30108 -d 0 -c 0 -n $this->_request->searchInput -p 1

<?xml version="1.0" encoding="iso-8859-1"?>
<response xmlns="urn:debugger_protocol_v1" 
xmlns:xdebug="http://xdebug.org/dbgp/xdebug" command="property_get" 
transaction_id="30108">
  <property name="$this-&gt;_request-&gt;searchInput" fullname="$this-&gt;_request-&gt;searchInput" address="139" type="object" classname="stdClass" children="1" numchildren="15" page="1" pagesize="32">
    <property name="CLASSNAME" type="string">stdClass</property>
  </property>
</response>

BUT this (-p 0) worked:
(cmd) property_get -i 30108 -d 0 -c 0 -n $this->_request->searchInput -p 0

<?xml version="1.0" encoding="iso-8859-1"?>
<response xmlns="urn:debugger_protocol_v1" 
xmlns:xdebug="http://xdebug.org/dbgp/xdebug" command="property_get" 
transaction_id="301">
  <property name="$this-&gt;_request-&gt;searchInput" fullname="$this-&gt;_request-&gt;searchInput" address="139" type="object" classname="stdClass" children="1" numchildren="15" page="0" pagesize="32">
    <property name="NumberOfRec" fullname="$this-&gt;_request-&gt;searchInput-&gt;NumberOfRec" facet="public" address="000000" type="int">50</property>
    <property name="StartingRec" fullname="$this-&gt;_request-&gt;searchInput-&gt;StartingRec" facet="public" address="11111" type="int">0</property>
    <property name="NumberOfA" fullname="$this-&gt;_request-&gt;searchInput-&gt;NumberOfA" facet="public" address="22222" type="int">1</property>
    <property name="ShowPos" fullname="$this-&gt;_request-&gt;searchInput-&gt;ShowPos" facet="public" address="33333" type="int">1</property>
    <property name="UserData" fullname="$this-&gt;_request-&gt;searchInput-&gt;UserData" facet="public" address="44444" type="string" size="66" encoding="base64">6M</property>
  </property>
</response>


Here is a workaround I found... I just hardcoded the nextpage to zero.

change line 2324 in geben.el
:page nextpage)))
to
:page 0)))

Hope it helps-
Doug

Original issue reported on code.google.com by [email protected] on 31 Mar 2011 at 11:07

Open local files

What steps will reproduce the problem?
1. Dev environment on workstation, server is a separate machine, project files 
from server mounted on workstation.
2. Start debugging with geben
3. Temporary remote files are opened instead of local files

What is the expected output? What do you see instead?
I'd like geben to open the local files and not the temporary remote ones.

What version of the product are you using? On what operating system?
Ubuntu Linux 10.10, emacs 23.1, geben 0.26


Original issue reported on code.google.com by [email protected] on 15 Feb 2011 at 8:45

[port 9000] Cannot bind server socket

What steps will reproduce the problem?
1. Install, XDebug, sudo make install in geben directory
2. restart php5-fpm
3. Load index.php for CodeIgniter and Alt-X geben

Expected output in README file

Got instead:
[port 9000] Cannot bind server socket 

using 0.26 on Ubuntu 11.04
NGinX, PHP5-FPM


Original issue reported on code.google.com by [email protected] on 26 Mar 2013 at 2:23

Geben hangs and shows abracadabra

What steps will reproduce the problem?
1. try to debug yii-application;
2. debug external class including in yii/framework/YiiBase.php;
3. stuck upon return from autoload.

What is the expected output? What do you see instead?
Instead of a normal step-by-step debugging a got a message "File 
~/projects/current_project/subfolder/my/.emacs.d/geben/54321/home/me/projects/cu
rrent_project/subfolder/yii/framework/YiiBase.php no longer exists!" and 
abracadabra like this: 
http://images.netbynet.ru/imgs/b74929bb2410b3e32736ac73f5cf58f0.png (or see 
attachment)

What version of the product are you using? On what operating system?
app-editors/emacs-23.3
app-emacs/cedet-1.0
app-emacs/ecb-2.40-r1
app-emacs/emacs-common-gentoo-1.2-r2
dev-lang/php-5.3.6
dev-php/xdebug-2.1.1
dev-php/xdebug-client-2.1.1
virtual/emacs-23

Please provide any additional information below.
At least, how to make geben view log in a _human-readable_ way?

Original issue reported on code.google.com by [email protected] on 19 Aug 2011 at 12:34

Attachments:

Geben does not close buffers when PHP debug session finished

What steps will reproduce the problem?
1. Conduct a PHP debug session and step through some code files so that geben 
opens some debugging buffers
2. End the debug session ("q" or "g")

What is the expected output? What do you see instead?
Geben should close the PHP debug buffers it had opened, but they remain open 
(causing huge number of junk buffers after every debug session when used on a 
sizeable application).

What version of the product are you using? On what operating system?
Geben 0.26, Emacs 23.1.1, Xdebug 2.1.1, Ubuntu 10.10
php.ini ...
[debug]
xdebug.remote_autostart=1
xdebug.remote_enable=1
xdebug.remote_handler=dbgp
xdebug.remote_host=127.0.0.1
xdebug.remote_port=9000
xdebug.remote_mode=req
xdebug.var_display_max_depth=3


Please provide any additional information below.
Works correctly on another PC with Geben 0.26, Emacs 23.2.1, Xdebug 2.0.5, 
Ubuntu 10.10
php.ini ...
[debug]
xdebug.remote_autostart=off
xdebug.remote_enable=on
xdebug.remote_handler=dbgp
xdebug.remote_mode=req
xdebug.remote_host=localhost
xdebug.remote_port=9000

If wontfix, any pointers as to where the problem might lie, or how to try and 
solve (without reinstalling all sorts of dependencies)? Thanks.

Original issue reported on code.google.com by [email protected] on 11 Feb 2012 at 2:24

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.