Debug option not available/does nothing using Python plugin in IDEA 2017.1

Answered

I can't get IDEA to run a python script in the debugger. The run functionality works correctly, but the Debug button is "grayed out" and the context menu option to Debug has no effect.

 

 

I tried making a brand new python project and I get the same issue

0
10 comments

Please provide the screenshot of the run/debug configuration.

0
Avatar
Permanently deleted user

0

Can't reproduce. Could you please specify the exact IntelliJ IDEA and Python plug-in versions that you have?

Can you try it with some other Python interpreter?

0
Avatar
Permanently deleted user

Same issue with python3 (non homebrew). Python plugin version: Version: 2017.1.171.4694.26

0
Avatar
Permanently deleted user

I don't even have an option to show the debug console at the bottom left of IDEA

 

0

Same version here. Debug console tool window option will appear only after debug session is started.

Any errors in idea.log (https://intellij-support.jetbrains.com/hc/articles/207241085)?

Can you reproduce it in a new project?

0
Avatar
Permanently deleted user

New projects have the same error. The only thing I see relevant to python in the log is a stack trace about Invalid Root

 

2017-06-30 13:17:45,315 [ 88874] ERROR - j.openapi.roots.impl.RootIndex - IntelliJ IDEA 2017.1.4 Build #IU-171.4694.23 
2017-06-30 13:17:45,315 [ 88874] ERROR - j.openapi.roots.impl.RootIndex - JDK: 1.8.0_112-release
2017-06-30 13:17:45,315 [ 88874] ERROR - j.openapi.roots.impl.RootIndex - VM: OpenJDK 64-Bit Server VM
2017-06-30 13:17:45,315 [ 88874] ERROR - j.openapi.roots.impl.RootIndex - Vendor: JetBrains s.r.o
2017-06-30 13:17:45,315 [ 88874] ERROR - j.openapi.roots.impl.RootIndex - OS: Mac OS X
2017-06-30 13:17:45,315 [ 88874] ERROR - j.openapi.roots.impl.RootIndex - Last Action:
2017-06-30 13:17:45,315 [ 88874] ERROR - j.openapi.roots.impl.RootIndex - Invalid root file:///Users/josh/Library/Application Support/IntelliJIdea2017.1/python/helpers/typeshed/stdlib/2and3 in musicday-mvp -> < Python 3.6.1 (/usr/local/bin/python3) >
java.lang.Throwable
at com.intellij.openapi.diagnostic.Logger.error(Logger.java:132)
at com.intellij.openapi.roots.impl.RootIndex.a(RootIndex.java:195)
at com.intellij.openapi.roots.impl.RootIndex.a(RootIndex.java:143)
at com.intellij.openapi.roots.impl.RootIndex.<init>(RootIndex.java:68)
at com.intellij.openapi.roots.impl.DirectoryIndexImpl.c(DirectoryIndexImpl.java:111)
at com.intellij.openapi.roots.impl.DirectoryIndexImpl.getInfoForFile(DirectoryIndexImpl.java:146)
at com.intellij.openapi.roots.impl.FileIndexBase.getInfoForFileOrDirectory(FileIndexBase.java:57)
at com.intellij.openapi.roots.impl.ProjectFileIndexImpl.isUnderIgnored(ProjectFileIndexImpl.java:96)
at com.intellij.openapi.roots.impl.ProjectFileIndexFacade.isUnderIgnored(ProjectFileIndexFacade.java:74)
at com.intellij.psi.impl.file.impl.FileManagerImpl.findDirectoryImpl(FileManagerImpl.java:445)
at com.intellij.psi.impl.file.impl.FileManagerImpl.findDirectory(FileManagerImpl.java:433)
at com.intellij.psi.impl.file.impl.FileManagerImpl.removeInvalidFilesAndDirs(FileManagerImpl.java:528)
at com.intellij.psi.impl.file.impl.PsiVFSListener$MyModuleRootListener$2.run(PsiVFSListener.java:673)
at com.intellij.openapi.application.impl.ApplicationImpl.runWriteAction(ApplicationImpl.java:1023)
at com.intellij.psi.impl.file.impl.PsiVFSListener$MyModuleRootListener.rootsChanged(PsiVFSListener.java:665)
at sun.reflect.GeneratedMethodAccessor65.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at com.intellij.util.messages.impl.MessageBusConnectionImpl.deliverMessage(MessageBusConnectionImpl.java:117)
at com.intellij.util.messages.impl.MessageBusImpl.doPumpMessages(MessageBusImpl.java:437)
at com.intellij.util.messages.impl.MessageBusImpl.pumpWaitingBuses(MessageBusImpl.java:398)
at com.intellij.util.messages.impl.MessageBusImpl.pumpMessages(MessageBusImpl.java:387)
at com.intellij.util.messages.impl.MessageBusImpl.pumpMessages(MessageBusImpl.java:380)
at com.intellij.util.messages.impl.MessageBusImpl.sendMessage(MessageBusImpl.java:373)
at com.intellij.util.messages.impl.MessageBusImpl.access$200(MessageBusImpl.java:44)
at com.intellij.util.messages.impl.MessageBusImpl$2.invoke(MessageBusImpl.java:230)
at com.sun.proxy.$Proxy116.rootsChanged(Unknown Source)
at com.intellij.openapi.roots.impl.ProjectRootManagerComponent.fireRootsChangedEvent(ProjectRootManagerComponent.java:205)
at com.intellij.openapi.roots.impl.ProjectRootManagerImpl.b(ProjectRootManagerImpl.java:410)
at com.intellij.openapi.roots.impl.ProjectRootManagerImpl.access$100(ProjectRootManagerImpl.java:54)
at com.intellij.openapi.roots.impl.ProjectRootManagerImpl$BatchSession.a(ProjectRootManagerImpl.java:105)
at com.intellij.openapi.roots.impl.ProjectRootManagerImpl$BatchSession.rootsChanged(ProjectRootManagerImpl.java:118)
at com.intellij.openapi.roots.impl.ProjectRootManagerImpl.makeRootsChange(ProjectRootManagerImpl.java:350)
at org.jetbrains.kotlin.idea.core.script.KotlinScriptConfigurationManager$notifyRootsChanged$rootsChangesRunnable$1$1.invoke(KotlinScriptConfigurationManager.kt:102)
at org.jetbrains.kotlin.idea.core.script.KotlinScriptConfigurationManager$notifyRootsChanged$rootsChangesRunnable$1$1.invoke(KotlinScriptConfigurationManager.kt:51)
at org.jetbrains.kotlin.idea.util.application.ApplicationUtilsKt$sam$Computable$171b25db.compute(ApplicationUtils.kt)
at com.intellij.openapi.application.impl.ApplicationImpl.runWriteAction(ApplicationImpl.java:1035)
at org.jetbrains.kotlin.idea.util.application.ApplicationUtilsKt.runWriteAction(ApplicationUtils.kt:28)
at org.jetbrains.kotlin.idea.core.script.KotlinScriptConfigurationManager$notifyRootsChanged$rootsChangesRunnable$1.invoke(KotlinScriptConfigurationManager.kt:99)
at org.jetbrains.kotlin.idea.core.script.KotlinScriptConfigurationManager$notifyRootsChanged$rootsChangesRunnable$1.invoke(KotlinScriptConfigurationManager.kt:51)
at org.jetbrains.kotlin.idea.core.script.KotlinScriptConfigurationManagerKt$sam$Runnable$5974abf6.run(KotlinScriptConfigurationManager.kt)
at com.intellij.openapi.application.TransactionGuardImpl$2.run(TransactionGuardImpl.java:303)
at com.intellij.openapi.application.impl.LaterInvocator$FlushQueue.a(LaterInvocator.java:410)
at com.intellij.openapi.application.impl.LaterInvocator$FlushQueue.run(LaterInvocator.java:399)
at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:311)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:762)
at java.awt.EventQueue.access$500(EventQueue.java:98)
at java.awt.EventQueue$3.run(EventQueue.java:715)
at java.awt.EventQueue$3.run(EventQueue.java:709)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:80)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:732)
at com.intellij.ide.IdeEventQueue.k(IdeEventQueue.java:827)
at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.java:655)
at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:365)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:201)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:82)

 

When I do an `ls` on the root, it exists. I know there was a bug I reported a couple years ago in PyCharm where it had problems with directories that had spaces in the name. 

josh$ ls "/Users/josh/Library/Application Support/IntelliJIdea2017.1/python/helpers/typeshed/third_party/2and3"
Crypto backports_abc.pyi characteristic mypy_extensions.pyi requests
atomicwrites boto jinja2 pymysql singledispatch.pyi
backports certifi.pyi markupsafe pytz ujson.pyi
0

Not sure it's related to the problem.

Bug report with the logs directory zipped is welcome at https://youtrack.jetbrains.com/issues/PY.

0
Avatar
Permanently deleted user

Thanks for trying to work it out with me. I'll post a bug. Does it go in the PyCharm tracker since it's the plugin for IDEA?

0

Since it's specific to Python, PyCharm tracker would the proper project.

1

Please sign in to leave a comment.