8000 [Debug] Separate visually errors from vendor and from application · Issue #23144 · symfony/symfony · GitHub
[go: up one dir, main page]

Skip to content

[Debug] Separate visually errors from vendor and from application #23144

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

Closed
rentalhost opened this issue Jun 12, 2017 · 3 comments
Closed

[Debug] Separate visually errors from vendor and from application #23144

rentalhost opened this issue Jun 12, 2017 · 3 comments

Comments

@rentalhost
Copy link
Q A
Bug report? no
Feature request? yes
BC Break report? no
RFC? no
Symfony version 3.3.2 (last)

Should be great if on debug a stacktrace (like on the "whoops" page) we have a visual difference between the "vendor code" and the "application code". It can help find out "where my problem starts".

The ReflectionClass() should help to tell where file is located, then just check if it is from "vendor" folder to mark as "white background" else "yellow background" to indicate an "user-zone file".

Example:

image

@fabpot
Copy link
Member
fabpot commented Jun 12, 2017

That's a great idea!

rentalhost added a commit to rentalhost/symfony that referenced this issue Jun 12, 2017
rentalhost added a commit to rentalhost/symfony that referenced this issue Jun 12, 2017
rentalhost added a commit to rentalhost/symfony that referenced this issue Jun 12, 2017
rentalhost added a commit to rentalhost/symfony that referenced this issue Jun 12, 2017
rentalhost added a commit to rentalhost/symfony that referenced this issue Jun 12, 2017
rentalhost added a commit to rentalhost/symfony that referenced this issue Jun 12, 2017
@rentalhost
Copy link
Author

Fixed on PR #23152.

@xabbuh
Copy link
Member
xabbuh commented Jun 12, 2017

reopening here (will be closed when the PR is merged, but this way we don't lose track in case the PR gets closed for some reason)

@xabbuh xabbuh reopened this Jun 12, 2017
@fabpot fabpot closed this as completed Mar 27, 2018
fabpot added a commit that referenced this issue Mar 27, 2018
… (javiereguiluz)

This PR was squashed before being merged into the 4.1-dev branch (closes #26671).

Discussion
----------

More compact display of vendor code in exception pages

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | no
| New feature?  | yes
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #23144
| License       | MIT
| Doc PR        | -

I like the general idea proposed in #23152 ... but I don't like the implementation ... so this PR is an alternative implementation.

**UPDATE**: the proposed feature has been completely redesigned. See #26671 (comment)

~~The idea is to **hide by default all information that comes from "vendors"** (`vendor/` or `var/cache/` dir) because that code is out of your reach and you can't change it to fix your error.~~

~~In practice, each exception trace now would display a `Hide vendors` option enabled by default:~~

<details>
<summary>Click here to view the outdated images</summary>

![hide-vendors](https://user-images.githubusercontent.com/73419/37895113-a9d942bc-30e0-11e8-9ff4-191dcb057d60.png)

It works like a toggle ... and it's compatible with the overall toggle of each trace header:

![hide-vendors](https://user-images.githubusercontent.com/73419/37895137-b9e8d406-30e0-11e8-82bd-5729d32aaa63.gif)

When exceptions are complex, the amount of noise removed is massive:

## Before

![before](https://user-images.githubusercontent.com/73419/37895233-f9170eea-30e0-11e8-8c21-c514007d44d2.png)

## After

![after](https://user-images.githubusercontent.com/73419/37895240-fc2e50c0-30e0-11e8-9e5a-b7a73ba57b47.png)

</details>

Commits
-------

510b05f More compact display of vendor code in exception pages
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

4 participants
0