Some intellisense errors/warnings do not show a tooltip.

PHP Tools [?] extends Visual Studio with set of advanced features to work more efficiently with PHP code.

Some intellisense errors/warnings do not show a tooltip.

Postby DanTalash » June 20th, 2018, 5:32 pm

Usually when you have some kind of issue in the code, hovering your mouse over the underlined code will display a tooltip indicating what the problem is.

In some cases I am unable to view the message. For example, the following simple function has 3 different problems:

Code: Select all
function foo($input) {
    $divisionByZero = 1 / 0;

    if ($input) {
        return $divisionByZero;
    }

    $unusedVar = 1;
}


The issues are that not all paths return a value, division by zero, and an unused variable. I am unable to see the message regarding the unused variable. See the following recording:
You do not have the required permissions to view the files attached to this post.
DanTalash
 
Posts: 23
Joined: November 25th, 2015, 6:19 pm

Re: Some intellisense errors/warnings do not show a tooltip.

Postby Jakub Misek » June 20th, 2018, 7:01 pm

It should also show you the `$unusedVariable` info (see attachment), not just the warning.

Also I've noticed the the function tooltip is not correct (it states `mixed $bar` and return type `void`), it should be `$input` with return type `double|integer`.

We couldn't replicate the issue - may I ask for your activity log? (https://docs.devsense.com/troubleshooti ... itylog-xml)

It might be problem with your license, or another extension you have in VS.
You do not have the required permissions to view the files attached to this post.
Jakub Misek │ DEVSENSE s.r.o. | @misekjakubjakub@devsense.com
User avatar
Jakub Misek
 
Posts: 2078
Joined: January 4th, 2012, 2:42 pm
Location: Prague

Re: Some intellisense errors/warnings do not show a tooltip.

Postby DanTalash » June 21st, 2018, 9:10 pm

I was having a lot of difficulty reproducing this issue on a fresh VS boot until I realized that it only happens when the debugger is listening. See updated screen recording.

Hopefully this is enough to repro on your side. If you still need I can provide the activity log, but there doesn't appear to be any errors in there.
You do not have the required permissions to view the files attached to this post.
DanTalash
 
Posts: 23
Joined: November 25th, 2015, 6:19 pm


Return to PHP Tools

Who is online

Users browsing this forum: No registered users and 2 guests

cron

User Control Panel

Login

Who is online

In total there are 2 users online :: 0 registered, 0 hidden and 2 guests (based on users active over the past 5 minutes)
Most users ever online was 77 on September 4th, 2018, 9:46 pm

Users browsing this forum: No registered users and 2 guests
Phalanger