Giter Site home page Giter Site logo

addiks / gedit-dbgp-plugin Goto Github PK

View Code? Open in Web Editor NEW
4.0 5.0 2.0 90 KB

This plugin allows you to use gedit-3 as a debugging-client using the DBGp protocol (e.g.: XDebug).

License: GNU General Public License v3.0

Python 100.00%
gedit gedit-plugin xdebug python dbgp-proxies xdebugclient dbgp-client profiles breakpoints dbgp-protocol

gedit-dbgp-plugin's People

Contributors

addiks avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

gedit-dbgp-plugin's Issues

Debugging window should remember it's size.

Currently the debugging-window will be opened with the same dimensions (width x height) every time regardless if it was resized previously or not. Because this default dimensions are not always optimal for the user's screen resolution it will be resized manually every time it is used, thus wasting time.

Whenever the window get's resized, it should store it's new size in the user's profile. If possible it should store the size per screen resolution so that every resolution the user uses has it's own size for the debugging window. This profits the use-case of a user having a laptop that is used in different set-up's (small screen when mobile, big external screen when docked).

This issue was requested in issue #11 "Question about remote path mapping".

Question about remote path mapping

This is more of a support question rather than a bug report. I am trying to configure path mapping without success. The README has not helped much either :( My "remote" environment runs as a Virtualbox VM and shares files over NFS. So "/vagrant" of the remote environment is available as "/home/foo/vm/" in the local environment where I am running gedit. I have dropped a PHP file inside /vagrant and trying to debug it, but gedit seem to be ignoring it. While setting up path mapping, I have used "file:///vagrant/" as the remote path and "file:///home/foo/vm/" as the local path. Is this the right way to set it?

Debugging local PHP files is working okay. I have also ran netcat on port 9000 of the local machine and saw xdebug's XML snippets pouring in from the remote machine. So xdebug seem to be properly configured in the remote machine.

The profile file from /home/foo/.local/share/gedit/addiks/xdebug/debug-profiles/default currently looks like this:
{'dbgp_ide_key': 'GEDIT', 'port': 9000.0, 'dbgp_active': False, 'dbgp_host': 'localhost', 'dbgp_port': 9001.0, 'url': ''}

Cannot break in first statement

This plugin is a missing-link! Thanks a lot.
I have some problems:

php.ini:
zend_extension=xdebug.so
xdebug.idekey=GEDIT

`php -i  | grep -i xdebug`
xdebug support => enabled
xdebug.remote_port => 9000 => 9000

profiles:
connect to DBGp not checked
URL to call: [empty]
Port: 9000
IDE-Key: GEDIT

"Start listening for debug-sessions"
Setting a break-point

`netstat -antp | grep gedit`:
0.0.0.0:9000            0.0.0.0:*               LISTEN      30498/gedit

> php -d xdebug.remote_autostart=1 test.php

Does not work. What is my problem?

Having trouble in gedit 3.14.0

Hi,
I am using this plugin with Gedit 3.14.0 in Debian 8.5. Whenever I enable this plugin, I get the following error message:
Traceback (most recent call last): File "/home/ju/.local/share/gedit/plugins/gedit-dbgp-plugin/AddiksDBGP/AddiksDBGPApp.py", line 65, in do_activate mainMenu.append_item(item) AttributeError: 'NoneType' object has no attribute 'append_item'

It appear to be a problem with the menu, so I copy-pasted some menu-related code from the Crypto plugin and it seem to be working okay. Here is a diff of what I have got:

`diff --git a/AddiksDBGP/AddiksDBGPApp.py b/AddiksDBGP/AddiksDBGPApp.py
index 4ff11d6..8e8f099 100644
--- a/AddiksDBGP/AddiksDBGPApp.py
+++ b/AddiksDBGP/AddiksDBGPApp.py
@@ -58,11 +58,10 @@ class AddiksDBGPApp(GObject.Object, Gedit.AppActivatable):
AddiksDBGPApp.__instance = self

     if "extend_menu" in dir(self): # build menu for gedit 3.12 (one menu per application)
  •        self.submenu_ext = self.extend_menu("tools-section-1")
         submenu = Gio.Menu()
         item = Gio.MenuItem.new_submenu(_("Debugging"), submenu)
    
  •        mainMenu = self.app.get_menubar()
    
  •        mainMenu.append_item(item)
    
  •        self.submenu_ext.append_menu_item(item)
    
         for actionName, title, shortcut, callbackName in ACTIONS:
             if callbackName != None:
    

    `
    I am not an expert on gedit plugins, so I am not presenting this diff for inclusion in the gedit-xdebug plugin, instead I am providing it just to explain the problem. Hope it will help you under the issue.

Thanks,
Adnan

Unable to enable the plugin in gedit

When I try to enable the plugin from gedit -> Edit -> Preferences -> Plugins -> Addiks - DBGp client (XDebug), the plugin greys out with a red 'minus' icon. Then i tried running gedit from terminal and i got this error

File "/home/pradeepsmk/.local/share/gedit/plugins/addiks-dbgp/addiks-dbgp.py", line 17, in <module>
    from AddiksDBGP.AddiksDBGPApp import AddiksDBGPApp
  File "/home/pradeepsmk/.local/share/gedit/plugins/addiks-dbgp/AddiksDBGP/AddiksDBGPApp.py", line 26, in <module>
    from AddiksDBGP.ProfileManager import ProfileManager
  File "/home/pradeepsmk/.local/share/gedit/plugins/addiks-dbgp/AddiksDBGP/ProfileManager.py", line 21, in <module>
    from AddiksDBGP.DebugSession import DebugSession
  File "/home/pradeepsmk/.local/share/gedit/plugins/addiks-dbgp/AddiksDBGP/DebugSession.py", line 23, in <module>
    from AddiksDBGP.GladeHandler import GladeHandler
  File "/home/pradeepsmk/.local/share/gedit/plugins/addiks-dbgp/AddiksDBGP/GladeHandler.py", line 20, in <module>
    from AddiksDBGP import AddiksDBGPApp
ImportError: cannot import name 'AddiksDBGPApp'

I thought that the import statement is not able to find the file, and it appears to be circular reference. So I commented that line 20 in GladeHandler.py file on my machine and I am able to activate the plugin in gedit.

I am not a python developer so not sure about that import statement.

3.12 support?

I might be missing something, but there is no appearance of "Debugging" in the menu under gedit 3.12.2

is this a known limitation or is this pebkac?

Every window should be able to stop debugging.

Currently only the window that has started debugging can stop it. All other windows show the option "start debugging" in the menu which cannot be selected because debugging has already started ("Port 9000 already open"). Every window should be able to stop debugging.

Docking window

Feature request:
It would be great, if the debugging-window would "dock" to gedit.
Also hotkeys, e.g. F10=step over would be great.

Reverse order of stack-trace in debugger

Currently the order of the displayed stack-trace puts the entries most near to the current point of execution (and thus the most important to the user) to the bottom of the list and thus the farthest away from the user's view. Thus the order of the entries in the displayed stack-trace should be reversed to put the most interesting entries directly into the view of the user.

Finding a variable in a cluttered scope is too hard.

Currently all local variables, global variables and constants are listed in the same view without any option to filter or search what the user is looking for. When there are many of either of these three types in the current visibility-scope this view can get very cluttered and finding a specific variable or constant can get very hard.

There should be a way to filter the entries in this view as well as a simple was to reset these filters:
a) A full-text-search between all listed entries so only matching entries are listed.
b) Filter the entries by type: "all", "local variables", "global variables", "constants". (As radio buttons)

This issue was originally requested in issue #11 "Question about remote path mapping".

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.