30 Matching Annotations
  1. Oct 2020
    1. I’ll give you a more concrete example. I was writing a technical post yesterday. During the writing process, I found a way to make my code more efficient. When I write, I tend to analyze more than I do at any other time. I analyzed my code with a more critical eye because I wanted to offer you, the reader, the best experience. This is an experience I have had many times throughout writing on this blog.

      This also sounds very closely related to the idea of rubber duck debugging.

  2. Sep 2020
    1. But because that final CSS file is probably minified (all whitespace removed), DevTools is likely to tell us that we’ll find the declaration we’re looking for on line 1! Unfortunate, and not helpful for development.
  3. Jun 2020
    1. in Python - setting up basic logger is very simple

      Apart from printing the result, it is better to debug with logging.

      Sample logger:

      import logging
          format= '[%(asctime)s] {%(pathname)s:%(lineno)d} %(levelname)s - %(message)s',
      logging.error("Some serious error occurred.")
      logging.warning('Function you are using is deprecated.')

      the sample result:

      [12:52:35] {<stdin>:1} ERROR - Some serious error occurred.
      [12:52:35] {<stdin>:1} WARNING - Function you are using is deprecated.

      to find its location, type:

  4. May 2020
    1. Before enabling this, you should ensure jobs are visible to team members only. You should also erase all generated job logs before making them visible again.
  5. Apr 2020
    1. Note: When you create a new virtual environment, you should be prompted by VS Code to set it as the default for your workspace folder. If selected, the environment will automatically be activated when you open a new terminal.

      After creating a new project related environment, it shall be specified as a default for this specific project

    2. Tip: Use Logpoints instead of print statements: Developers often litter source code with print statements to quickly inspect variables without necessarily stepping through each line of code in a debugger. In VS Code, you can instead use Logpoints. A Logpoint is like a breakpoint except that it logs a message to the console and doesn't stop the program. For more information, see Logpoints in the main VS Code debugging article.

      Try to use logpoints instead of print statements.

      More info: https://code.visualstudio.com/docs/editor/debugging#_logpoints

  6. Mar 2020
  7. Jan 2020
    1. If you enable the -v switch to ssh you can see what's going on: 1st command: debug1: Sending command: /bin/sh -c "cd /boot && ls -l"
    1. git -c core.sshCommand="ssh -vvv" pull

      This seems like the most reliable and direct way to enable debugging of the ssh connection (authentication, etc.) used by a git command.

  8. Dec 2019
    1. If none of these commands identified the duplication, try analyzing your bundle for multiple instances of @material-ui/styles. You can just check your bundle source, or use a tool like source-map-explorer or webpack-bundle-analyzer.
    2. server-side rendering is strict about configuration, and the best way to find out what's wrong is to compare your project to an already working setup. Check out the reference implementations, bit by bit.
  9. Nov 2019
  10. Oct 2019
  11. Aug 2019
  12. Nov 2018
    1. One quick trick for making it easier for debugging/understanding your threading macros is to put print statements in between some of the steps. The important thing to remember is that all the print functions in clojure return nil so you need to make a little helper function (I like to call mine ?) that prints and then returns the original input, like this: (defn ? [x] (prn x) x)

      debugging trick

  13. Oct 2018
  14. Apr 2018
  15. Jan 2018
    1. Default Value

      Please note that the values listed below are the default ones. An Option can represent a Boolean toggle flag (i.e. HeapDumpOnOutOfMemoryError, PrintConcurrentLocks). For such Options, '+' and '-' flags deal with Boolean toggling. In short:

      • '+' means Enable (or set to '1');
      • '-' means Disable (or set to '0').

      For example, in the table pertaining to Debugging Options, by default the -XX:-HeapDumpOnOutOfMemoryError is Disabled, because it has the - prepended to it. To actually Enable it, change that with +, yielding the variant -XX:+HeapDumpOnOutOfMemoryError.

  16. Nov 2016
    1. Vorlon.JS is a tool for remotely debugging JavaScript on any device. Use involves running a Vorlon debugging server on the machine hosting the web service and adding a script tag containing the client runtime to the page that you want to debug.

  17. Jan 2016