Giter Site home page Giter Site logo

Using gdb with Revel about revel HOT 20 CLOSED

revel avatar revel commented on May 22, 2024
Using gdb with Revel

from revel.

Comments (20)

robfig avatar robfig commented on May 22, 2024

Excellent point. I will look at the best way to support this. Hope to have a solution for you before long.

from revel.

robfig avatar robfig commented on May 22, 2024

FYI, in the meantime, after Revel generates your app, you can just do:

  1. go build -o bin/myapp import/path/to/myapp/app/tmp
  2. run gdb on the binary bin/myapp.
  3. Pass in flags "-importPath", "-srcPath", "-runMode"

from revel.

 avatar commented on May 22, 2024

Could you give me some details on the value for the 3 flags ? I tried to put my $GOPATH for the first two and "dev" for the runMode but I got :

2012/10/28 17:31:15 revel.go:90: Failed to load app.conf: not found

Thank you.

from revel.

robfig avatar robfig commented on May 22, 2024

importPath is the import path to your base app directory. For example, for the booking sample app, it would be "github.com/robfig/revel/samples/booking".

srcPath should be $GOPATH/src, but you don't actually need to specify it in this case.

from revel.

 avatar commented on May 22, 2024

This works perfectly, thanks !

from revel.

robfig avatar robfig commented on May 22, 2024

I have really been putting this one off apparently :)

Implementing a revel debug command that drops the user into the gdb session in the console is probably the way to go.. I guess there is no equivalent on windows

from revel.

jgraham909 avatar jgraham909 commented on May 22, 2024

FWIW minGW is a way to get GDB in windows.
On Mar 24, 2013 12:05 PM, "Rob Figueiredo" [email protected] wrote:

I have really been putting this one off apparently :)

Implementing a revel debug command that drops the user into the gdb
session in the console is probably the way to go.. I guess there is no
equivalent on windows

β€”
Reply to this email directly or view it on GitHubhttps://github.com/robfig/revel/issues/33#issuecomment-15366140
.

from revel.

rmacy avatar rmacy commented on May 22, 2024

@robfig would revel debug build the app and run gdb on the executable with the appropriate flags set? If not how were you envisioning the implementation? Just curious, would love to submit a PR for this.

from revel.

robfig avatar robfig commented on May 22, 2024

I think so -- at any rate, that seems like the first step. I could imagine a more gold-plated solution where we add a servlet to the harness so that the developer could go to a special URL, select an action that they want to debug and have Revel place the breakpoint there on their behalf. That seems like too much work for now though :)

(I'm a print debugger, so this workflow is alien to me. It probably won't get implemented without someone's vision and assistance. I am happy to support however I can, though!)

from revel.

rmacy avatar rmacy commented on May 22, 2024

@robfig I'm working on this! I'll be rather quiet the next two weeks though, I have to head out for my Annual Training and I'll be lucky to be near a computer.

from revel.

kidoman avatar kidoman commented on May 22, 2024

Hey guys, any luck on this? Loving Revel though

from revel.

imosquera avatar imosquera commented on May 22, 2024

I'm also very interested in the debug command for revel! Is there a branch that you've started to work through the revel debug? Otherwise I can fork and begin build the command.

from revel.

robfig avatar robfig commented on May 22, 2024

I don't think anyone has worked on this

from revel.

rmacy avatar rmacy commented on May 22, 2024

Yeah, I got caught up in other work and with the Military, so I didn't make much headway :/

from revel.

justinfx avatar justinfx commented on May 22, 2024

As another option for debugging, has anyone every checked out hopwatch? I know it would be another dependency, but since Revel already has the web-view based concept of seeing your tracebacks, and has all the endpoints for modules, it might be neat: https://github.com/emicklei/hopwatch

from revel.

robfig avatar robfig commented on May 22, 2024

This one looks even better
https://github.com/sirnewton01/godbg

from revel.

justinfx avatar justinfx commented on May 22, 2024

Wow that is really awesome

On Mon, Sep 9, 2013 at 11:40 AM, Rob Figueiredo [email protected]:

This one looks even better
https://github.com/sirnewton01/godbg

β€”
Reply to this email directly or view it on GitHubhttps://github.com/robfig/revel/issues/33#issuecomment-24032451
.

from revel.

brendensoares avatar brendensoares commented on May 22, 2024

#294

from revel.

brendensoares avatar brendensoares commented on May 22, 2024

Debugging Revel apps with gdb is a common request needing an official answer.

TODO

  • Official guide on how to debug Revel code
  • Enhancements to facilitate easy debugging (revel debug, IDE integration, etc)

from revel.

notzippy avatar notzippy commented on May 22, 2024

Closing - docs have intellij debugging now

from revel.

Related Issues (20)

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.