php-perfect / ddev-intellij-plugin

DDEV Tool Integration for IntelliJ IDEA
https://plugins.jetbrains.com/plugin/18813-ddev-integration
BSD 3-Clause "New" or "Revised" License
109 stars 15 forks source link

Plugin triggers incorrect time logs in WakaTime #202

Closed JaZo closed 1 year ago

JaZo commented 1 year ago

Is there an existing issue for this?

Are you sure that this bug is related to this DDEV Integration Plugin?

Enter your error report ID (If available)

No response

Describe the bug

I use WakaTime to track the time I work on different projects. It keeps track of which files I have opened and for how long. But, it also tracks time for .ddev/xhprof/xhprof_prepend.php, which I never open.

Screenshot 2023-07-11 at 11-03-46 WakaTime - Dashboards for developers

N.B. I don't know for sure if this is a bug in this plugin or in the WakaTime plugin.

Steps to reproduce

  1. Make sure you have a (free) WakaTime account;
  2. Install (and configure) WakaTime plugin;
  3. Work on a project;
  4. Go to your WakaTime dashboard;
  5. See it tracked time for xhprof_prepend.php.

Additional context

No response

nico-loeber commented 1 year ago

Hey @JaZo, The Plugin does access some files in the background, like the .ddev/config.yaml and the .ddev/docker-compose-full.yaml. The xhprof_prepend.php is none of them. If you search for this string in this plugin you won't get any hit. So even if your time tracking plugin is tracking background access to files, which I would concider a bug, it is not the ddev plugin that is executing this file access.

It's possible that PHPStorm does internally access some of the files listed in your screenshot, the _ide_helper.php might be the mounted file phpstorm is using to detect the php version of the container and if xdebug is present.

In case your issue appears only with this plugin, check whether your issue still exists with the plugin disabled, but using the interpreters and settings configured by the plugin. I would guess that your issue still exists, even with the plugin disabled.

Another thing you can try is to disable the automatic configuration of the php interpreter in the plugin settings.

Hope this helps you in some way...

JaZo commented 1 year ago

Thanks for your elaborate response! I've disabled the plugin for now and I'll see what comes up in the time tracker.

JaZo commented 1 year ago

I've had this plugin disabled for a week now, but kept using the interpreters and settings configured by this plugin. I haven't seen any entry for xhprof_prepend.php in the time tracker right from the moment I disabled it. I'll re-enable the plugin now, but disable the automatic configuration of the php interpreter in the plugin settings like you suggested. Let's see what happens then!

nico-loeber commented 1 year ago

@JaZo, the xhprof_prepend.php file is located in the .ddev/xhprof directory. I didn't even know it is part of DDEV. I thought it might be a helper file used by PHPStorm internally. Definetly nothing the plugin works with.

rfay commented 1 year ago

To understand xhprof_prepend.php, see https://ddev.readthedocs.io/en/latest/users/debugging-profiling/xhprof-profiling/

JaZo commented 1 year ago

FWIW: I ended up excluding this file in the WakaTime config ($WAKATIME_HOME/.wakatime.cfg):

[settings]
exclude =
    \.ddev\/xhprof\/xhprof_prepend\.php$