Browse Source

Add troubleshooting guide

shalvah 5 years ago
parent
commit
67d3b7be16
3 changed files with 17 additions and 1 deletions
  1. 1 0
      docs/index.md
  2. 6 1
      docs/migrating.md
  3. 10 0
      docs/troubleshooting.md

+ 1 - 0
docs/index.md

@@ -12,6 +12,7 @@ Generate API documentation for humans from your Laravel/Lumen/[Dingo](https://gi
 * [Generating Documentation](generating-documentation.md)
 * [Documenting Your API](documenting.md)
 * [Helpful Tips](helpful-tips.md)
+* [Troubleshooting and Debugging](troubleshooting.md)
 * [Advanced Customization](customization.md)
 * [How This Works](description.md)
 * [Extending functionality with plugins](plugins.md)

+ 6 - 1
docs/migrating.md

@@ -39,7 +39,12 @@ _After you've done all of the above_, delete your `resources/docs/` and `public/
 - The `rebuild` command has been removed. By default, when you run `php artisan scribe:generate`, Scribe will not overwrite any Markdown files you've modified. If you want Scribe to do so, run with `--force`. 
 
 ### Low impact
-- `logo` is now `false` by default, so no logo spot will be shown. Relative paths and URLs are now supported too.
+- `logo` is now `false` by default, so no logo spot will be shown. Also, if you specify a logo, it will no longer be copied to the docs folder. Rather, the path to be logo will be used as-is as the `src` for the `<img>` tag in the generated doc. This means that you must use a path that's publicly accessible. 
+For example, if your logo is in `public/img`:
+- set `'logo' => '../img/logo.png'` for `static` type (output folder is `public/docs`)
+- set `'logo' => 'img/logo.png'` for `laravel` type
+
+You can also use a URL.
 
 ## Advanced users
 It's a new package with a different name, so a few things have changed. This section is especially important if you've written any custom strategies or extended any of the provided classes.

+ 10 - 0
docs/troubleshooting.md

@@ -0,0 +1,10 @@
+# Troubleshooting and Debugging
+This page contains a few tips to help you figure out what's wrong when Scribe seems to be acting up.
+
+## Increase the verbosity
+By default, Scribe will try to keep going until it processes all routes and generates your docs. If it encounters any problems while processing a route (such as a missing `@responseFile`, or some invalid configuration leading to an exception being thrown), it will output a warning and the exception message, then move on to the next route.
+
+If you need to see the full stack trace, you can run the command again with the `--verbose` flag. This will also output debug messages (such as the path Scribe takes in instantiating a model).
+
+## Turn on debug mode for your app
+Sometimes you may see a 500 `null` response shown in the generated examples. This is usually because an error occured within your application during a response call. The quickest way to debug this is by setting `app.debug` to `true` in your `response_calls.config` section in your `scribe.php` file. Alternatively, you can set `APP_DEBUG=true` in your `.env.docs` file and run the command with `--env docs`.