aboutsummaryrefslogtreecommitdiffstats
path: root/docs/pycharm
diff options
context:
space:
mode:
authorMatthew Lemon <y@yulqen.org>2024-05-13 17:26:25 +0100
committerMatthew Lemon <y@yulqen.org>2024-05-13 17:26:25 +0100
commitefbbd480ddc62e695123d31c31d233b0df5155bd (patch)
treebc2fb465edd5050d83c97f280b1aac8e023fe3e5 /docs/pycharm
After first pre-commit processing
Diffstat (limited to 'docs/pycharm')
-rw-r--r--docs/pycharm/configuration.rst70
-rw-r--r--docs/pycharm/images/1.pngbin0 -> 67153 bytes
-rw-r--r--docs/pycharm/images/2.pngbin0 -> 15163 bytes
-rw-r--r--docs/pycharm/images/3.pngbin0 -> 181106 bytes
-rw-r--r--docs/pycharm/images/4.pngbin0 -> 113084 bytes
-rw-r--r--docs/pycharm/images/7.pngbin0 -> 6284 bytes
-rw-r--r--docs/pycharm/images/8.pngbin0 -> 19800 bytes
-rw-r--r--docs/pycharm/images/f1.pngbin0 -> 254645 bytes
-rw-r--r--docs/pycharm/images/f2.pngbin0 -> 234376 bytes
-rw-r--r--docs/pycharm/images/f3.pngbin0 -> 235846 bytes
-rw-r--r--docs/pycharm/images/f4.pngbin0 -> 226939 bytes
-rw-r--r--docs/pycharm/images/issue1.pngbin0 -> 43350 bytes
-rw-r--r--docs/pycharm/images/issue2.pngbin0 -> 11625 bytes
13 files changed, 70 insertions, 0 deletions
diff --git a/docs/pycharm/configuration.rst b/docs/pycharm/configuration.rst
new file mode 100644
index 0000000..fa53a8f
--- /dev/null
+++ b/docs/pycharm/configuration.rst
@@ -0,0 +1,70 @@
+Docker Remote Debugging
+=======================
+
+To connect to python remote interpreter inside docker, you have to make sure first, that Pycharm is aware of your docker.
+
+Go to *Settings > Build, Execution, Deployment > Docker*. If you are on linux, you can use docker directly using its socket `unix:///var/run/docker.sock`, if you are on Windows or Mac, make sure that you have docker-machine installed, then you can simply *Import credentials from Docker Machine*.
+
+.. image:: images/1.png
+
+Configure Remote Python Interpreter
+-----------------------------------
+
+This repository comes with already prepared "Run/Debug Configurations" for docker.
+
+.. image:: images/2.png
+
+But as you can see, at the beginning there is something wrong with them. They have red X on django icon, and they cannot be used, without configuring remote python interpreter. To do that, you have to go to *Settings > Build, Execution, Deployment* first.
+
+
+Next, you have to add new remote python interpreter, based on already tested deployment settings. Go to *Settings > Project > Project Interpreter*. Click on the cog icon, and click *Add Remote*.
+
+.. image:: images/3.png
+
+Switch to *Docker Compose* and select `local.yml` file from directory of your project, next set *Service name* to `django`
+
+.. image:: images/4.png
+
+Having that, click *OK*. Close *Settings* panel, and wait few seconds...
+
+.. image:: images/7.png
+
+After few seconds, all *Run/Debug Configurations* should be ready to use.
+
+.. image:: images/8.png
+
+**Things you can do with provided configuration**:
+
+* run and debug python code
+
+.. image:: images/f1.png
+
+* run and debug tests
+
+.. image:: images/f2.png
+.. image:: images/f3.png
+
+* run and debug migrations or different django management commands
+
+.. image:: images/f4.png
+
+* and many others..
+
+Known issues
+------------
+
+* Pycharm hangs on "Connecting to Debugger"
+
+.. image:: images/issue1.png
+
+This might be fault of your firewall. Take a look on this ticket - https://youtrack.jetbrains.com/issue/PY-18913
+
+* Modified files in `.idea` directory
+
+Most of the files from `.idea/` were added to `.gitignore` with a few exceptions, which were made, to provide "ready to go" configuration. After adding remote interpreter some of these files are altered by PyCharm:
+
+.. image:: images/issue2.png
+
+In theory you can remove them from repository, but then, other people will lose a ability to initialize a project from provided configurations as you did. To get rid of this annoying state, you can run command::
+
+ $ git update-index --assume-unchanged pyblackbird_cc.iml
diff --git a/docs/pycharm/images/1.png b/docs/pycharm/images/1.png
new file mode 100644
index 0000000..06908a1
--- /dev/null
+++ b/docs/pycharm/images/1.png
Binary files differ
diff --git a/docs/pycharm/images/2.png b/docs/pycharm/images/2.png
new file mode 100644
index 0000000..1fb8cf1
--- /dev/null
+++ b/docs/pycharm/images/2.png
Binary files differ
diff --git a/docs/pycharm/images/3.png b/docs/pycharm/images/3.png
new file mode 100644
index 0000000..32c9335
--- /dev/null
+++ b/docs/pycharm/images/3.png
Binary files differ
diff --git a/docs/pycharm/images/4.png b/docs/pycharm/images/4.png
new file mode 100644
index 0000000..cf07f9d
--- /dev/null
+++ b/docs/pycharm/images/4.png
Binary files differ
diff --git a/docs/pycharm/images/7.png b/docs/pycharm/images/7.png
new file mode 100644
index 0000000..4f8807e
--- /dev/null
+++ b/docs/pycharm/images/7.png
Binary files differ
diff --git a/docs/pycharm/images/8.png b/docs/pycharm/images/8.png
new file mode 100644
index 0000000..05946f2
--- /dev/null
+++ b/docs/pycharm/images/8.png
Binary files differ
diff --git a/docs/pycharm/images/f1.png b/docs/pycharm/images/f1.png
new file mode 100644
index 0000000..2d8c4b6
--- /dev/null
+++ b/docs/pycharm/images/f1.png
Binary files differ
diff --git a/docs/pycharm/images/f2.png b/docs/pycharm/images/f2.png
new file mode 100644
index 0000000..b123a47
--- /dev/null
+++ b/docs/pycharm/images/f2.png
Binary files differ
diff --git a/docs/pycharm/images/f3.png b/docs/pycharm/images/f3.png
new file mode 100644
index 0000000..713ab54
--- /dev/null
+++ b/docs/pycharm/images/f3.png
Binary files differ
diff --git a/docs/pycharm/images/f4.png b/docs/pycharm/images/f4.png
new file mode 100644
index 0000000..11668ec
--- /dev/null
+++ b/docs/pycharm/images/f4.png
Binary files differ
diff --git a/docs/pycharm/images/issue1.png b/docs/pycharm/images/issue1.png
new file mode 100644
index 0000000..1bb68ee
--- /dev/null
+++ b/docs/pycharm/images/issue1.png
Binary files differ
diff --git a/docs/pycharm/images/issue2.png b/docs/pycharm/images/issue2.png
new file mode 100644
index 0000000..174f6fd
--- /dev/null
+++ b/docs/pycharm/images/issue2.png
Binary files differ