Created by: jason-henriksen
…ging new libraries
PR checklist
-
[Y] Read the contribution guidelines.
-
[N/A] Ran the shell script under
./bin/
to update Petstore sample so that CIs can verify the change. This PR doesn't change any generator, it changes the 'meta' command for creating new generators. -
[Y] Filed the PR against the correct branch:
master
,. Default:3.4.x
,4.0.x
master
. ( doing so now ) -
[N/A] Copied the technical committee to review the pull request if your PR is targeting a particular programming language.
This change does not target any existing generator, but the meta command to start new ones.
Description of the PR
I am working on a new generator that is specific to my company. I found it very difficult to debug the java code that sets up the data sent to the mustache files. The existing documentation suggests a complex method of running the jar in suspend and then attaching an IDE debugger on a debug port.
A much simpler way to get the generator running in the debugger was to simply create a JUnit test that calls the CLI class programmatically. When I debug the JUnit test, it calls the CLI, the CLI calls my code and then I've easily got my code running in debug mode without any mucking around with debug ports.
I tested this technique with my own work, and decided to contribute the idea here. It's a tiny change but hopefully it's helpful to people trying to debug their generators.