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

Debugging tutorial is overcomplicated #806

Open
XakepSDK opened this issue Jun 2, 2019 · 6 comments
Open

Debugging tutorial is overcomplicated #806

XakepSDK opened this issue Jun 2, 2019 · 6 comments
Labels
input wanted We would like to hear your opinion low priority Small issues like typos that don't have much of an impact

Comments

@XakepSDK
Copy link

XakepSDK commented Jun 2, 2019

https://docs.spongepowered.org/stable/en/plugin/debugging.html
This tutorial is completely wrong! You don't need to clone any sponge source code to just debug, everything you need is server jar and your plugin jar, that's all!
Replace or remove it.

  1. Create new IDEA project or open existing
  2. Open 'project structure' window
  3. Click on 'artifacts' tab
  4. Add artifact with source from module
  5. Point artifact's build output directory to mods dir. of sponge installation
  6. Save
  7. Open 'run configurations' window
  8. Add new run configuration 'JAR Application (that should be in '+' dropbox)
  9. Point 'Path to jar' to your forge.jar or spongevanilla.jar
  10. Change 'Working directory' to a directory, where forge.jar or spongevanilla.jar located
    if you don't do this, your project directory will be littered with sponge/forge/minecraft files
  11. Open run configuration window again
  12. In bottom part of this window you will see '+', click on it and add your artifact
  13. Save
  14. Now you can run your plugin with debugging, just press green bug icon near launch button.
@simon816
Copy link
Contributor

simon816 commented Jun 2, 2019

That won't give you source code or the ability to set breakpoints in sponge/minecraft code.

@XakepSDK
Copy link
Author

XakepSDK commented Jun 2, 2019

This will give source code and ability to set breakpoints up SF or SV code.
This won't give you deobfuscated names or ability to set breakpoints in MC or Forge code.
If don't know how can you debug code in JVM, i'm sure you don't need setting breakpoints in MC codebase or wanting deobfuscated names.

@gabizou gabizou changed the title Debugging tutorial is wrong! Debugging tutorial is overcomplicated Jun 2, 2019
@gabizou
Copy link
Member

gabizou commented Jun 2, 2019

This tutorial is completely wrong!

Your opinion. If someone does want to get a workspace with full code access, the docs are 100% right.

What I think the correct solution to the issue is:
Split up full vs "beginning to debug" docs and call it a day.

@zhourui123
Copy link

A lot of forge code gets mixin , can't be debugged(The line number is incorrect for debugging), Further setup is required for normal debugging

@gabizou
Copy link
Member

gabizou commented Jun 3, 2019

can't be debugged(The line number is incorrect for debugging)

Debugs just fine in intellij with the MinecraftDev plugin:
https://youtu.be/JQAnCC-ZDng

@XakepSDK
Copy link
Author

XakepSDK commented Jun 3, 2019

If you're using mixins, then you are using ForgeGradle too. FG has out of box run configs for IDE's, so current tutorial and this tutorial are unnecessary and confusing.

@Inscrutable Inscrutable added input wanted We would like to hear your opinion low priority Small issues like typos that don't have much of an impact labels Jun 6, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
input wanted We would like to hear your opinion low priority Small issues like typos that don't have much of an impact
Projects
None yet
Development

No branches or pull requests

5 participants