How do I use launchctl print? I made a launchd service file then started it. Now I want to use the launchctl print command but I'm not sure how.

I read: What is the difference between a `service-name` and a `service-target`? and tried using the id -u command with the user/ prefix but it also didn't work.

How do I use the launchtl print command with my com.foo.http service?

$ cat &lt;&lt;'EOF' &gt; ~/Library/LaunchAgents/com.foo.http.plist
&lt;?xml version="1.0" encoding="UTF-8"?&gt;
&lt;!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"&gt;
&lt;plist version="1.0"&gt;
&lt;dict&gt;
  &lt;key&gt;Label&lt;/key&gt;
  &lt;string&gt;com.foo.http&lt;/string&gt;
  &lt;key&gt;ProgramArguments&lt;/key&gt;
  &lt;array&gt;
    &lt;string&gt;/usr/local/bin/python3&lt;/string&gt;
    &lt;string&gt;-m&lt;/string&gt;
    &lt;string&gt;http.server&lt;/string&gt;
    &lt;string&gt;3000&lt;/string&gt;
  &lt;/array&gt;
  &lt;key&gt;RunAtLoad&lt;/key&gt;
  &lt;true/&gt;
  &lt;key&gt;KeepAlive&lt;/key&gt;
  &lt;true/&gt;
&lt;/dict&gt;
&lt;/plist&gt;
EOF
$ launchctl load ~/Library/LaunchAgents/com.foo.http.plist
$ launchctl list | grep com.foo.http
66590   0   com.foo.http
$ launchctl print ~/Library/LaunchAgents/com.foo.http.plist
Unrecognized target specifier. &lt;service-target&gt; takes a form of &lt;domain-target&gt;/&lt;service-id&gt;.
Please refer to `man launchctl` for explanation of the &lt;domain-target&gt; specifiers.
Usage: launchctl print &lt;domain-target&gt; | &lt;service-target&gt;
$ launchctl print com.foo.http
Unrecognized target specifier. &lt;service-target&gt; takes a form of &lt;domain-target&gt;/&lt;service-id&gt;.
Please refer to `man launchctl` for explanation of the &lt;domain-target&gt; specifiers.
Usage: launchctl print &lt;domain-target&gt; | &lt;service-target&gt;
$ launchctl print user/$(id -u)/com.foo.http
Could not find service "com.foo.http" in domain for uid: 501
$ launchctl version
Darwin Bootstrapper Version 6.0.0: Thu Apr 25 23:14:22 PDT 2019; root:libxpc_executables-1336.261.2~6/launchd/RELEASE_X86_64
As mentioned by @GordonDavisson in his comment How do I use launchctl print? use this command

launchctl print gui/$(id -u)/com.foo.http