Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Question]: Can't debug in Goland in Routes #3071

Closed
3 tasks done
vruzin opened this issue Jul 12, 2024 · 2 comments
Closed
3 tasks done

[Question]: Can't debug in Goland in Routes #3071

vruzin opened this issue Jul 12, 2024 · 2 comments

Comments

@vruzin
Copy link

vruzin commented Jul 12, 2024

Bug Description

Checking in Intellij Goland (dlv)

How to Reproduce

Checking in Intellij Goland (dlv)

Expected Behavior

Debug )))

Fiber Version

v2.52.5

Code Snippet (optional)

package main

import "github.com/gofiber/fiber/v3"
import "log"

func main() {
  app := fiber.New()
  fmt.Println("In main") // Breakpoint  working

  app.Post("/", Home).Name("Home")
  // Steps to reproduce

  log.Fatal(app.Listen(":3000"))
}

func Home(c *fiber.Ctx) error {
	fmt.Println("Home") // Breakpoint not working
	return c.SendString(fmt.Sprintf("Home: Ok\n%v", rand.Intn(100))) // Breakpoint  not working
}

Checklist:

  • I agree to follow Fiber's Code of Conduct.
  • I have checked for existing issues that describe my problem prior to opening this one.
  • I understand that improperly formatted bug reports may be closed without explanation.
Copy link

welcome bot commented Jul 12, 2024

Thanks for opening your first issue here! 🎉 Be sure to follow the issue template! If you need help or want to chat with us, join us on Discord https://gofiber.io/discord

@ReneWerner87
Copy link
Member

its working in my goland
image

my steps:

  1. start the server via dlv on the shell
 dlv --listen=:2345 --headless=true --api-version=2 --accept-multiclient debug main.go 
  1. start the debug listener
    image

  2. send rest requests

@ReneWerner87 ReneWerner87 changed the title 🐛 [Bug]: Can't debug in Goland in Routes [Question]: Can't debug in Goland in Routes Jul 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants