少し前からライブラリを読むトレーニングを始めたのですが、最近ようやく読み方がわかってきたので、やり始めた頃に知っておきたかったことをまとめます。 これから JavaScript/TypeScript で書かれたライブラリを読んでみようと思っている方の助けになれば嬉しいです。 「私はこういう道具を使ったり、こういう工夫をしています」みたいな感じの内容ですので、もし「もっといい読み方があるよ」みたいなのがありましたらIssueなどで教えていただきたいです。 (※ライブラリを読むにあたって、ブラウザの話と NodeJS の話があるのですが、似てる点がほとんどなのでごった煮します。) エントリポイントを探す ライブラリを読むにあたって そのライブラリが持つ module がどう協調して全体が作られるのか その関数は正確にはどういう挙動をするのか などを考えると、ユーザーから渡された入力や呼び出しが
Photo by Markus Spiske on UnsplashDebugging is key to building any application. One cannot build an application bug-free on the first go. Although there are a few things we could do to avoid creating bugs from a developers point of view, like defensive programming or Test Driven Development, in any non-trivial application, bugs are unavoidable. Knowing how to debug an application is a key skill fo
We're gonna takealigg---a little look at these topics: * 1:43 Debugging basics (--inspect) and Chrome DevTools integration * 4:17 Chrome DevTools demo * 8:46 Tools that make it even easier * 9:23 Add'l debugging APIs: * _debugProcess() to start debugging an existing node process * GDB interface for the CLI purists * inspect over a websocket * inspect with the new 'inspector' module * 11:
Everything you need to know about debugging Angular applications Too Long; Didn't Read“ <em>Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it.</em> ” — Brian Kernighan “ Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as
Drab - Remote Controlled Frontend Framework Living Pages in Phoenix Drab is the extension library to Phoenix Framework for providing an access to the browser's User Interface (DOM objects) from the server side. The main advantage is to eliminate necessity of writing two applications: one for the client-side, and one for the backend. All the UI control may be now done in the backend, eliminating JS
debug exposes a function; simply pass this function the name of your module, and it will return a decorated version of console.error for you to pass debug statements to. This will allow you to toggle the debug output for different parts of your module as well as the module as a whole. Example app.js: var debug = require('debug')('http') , http = require('http') , name = 'My App'; // fake app debug
こんばんは、cloudpack の @dz_ こと大平かづみです。 Prologue - はじめに Bluemix で Node.js のウェブアプリを作りたくて、まずはローカルマシンに環境を作ってみました。 さらに、Node.jsのデバッグもできる Visual Studio Code のデバッグを試してみます♪ 開発環境 Node.js npm Express Visual Studio Code Windows 10 各種インストール Node.js のインストール Node.js でインストーラーをダウンロードし、インストーラーを実行します。 Node.js のインストーラーを指示に従いながらインストールします。 Visual Studio Code のインストール Visual Studio Code でインストーラーをダウンロード・実行し、インストールします。 Express
1 はじめに 前回も紹介しましたが、Visual Studio Code(以下VS Code)でJavaScriptを書く場合に、型情報をうまく認識させると、格段に使い勝手が向上します。 公開当初、VS Codeでは、tsdを使用して型情報を取り込み、下記のようなリファレンスをコードに挿入する方法が取られてました。 /// <reference path="node/node.d.ts" /> このため、今でも、この方法を解説するドキュメントが多数公開されています。 しかし、Version 0.5.0 以降では、jsconfig.jsonを置くことで、上記のような挿入は必要なくなっています。 また、型情報の取得も、公式ドキュメントでは、tsdからtypingsにさらと変更されています。 Node.js Applications with VS Code 公式ページのビデオで紹介されている、
1 はじめに 約1年前、アルファ版として登場した、Visual Studio Code(以下VS Code)ですが、昨年11月には、ベータ版となり、またオープンソースとしてコードも公開されました。 公開以来、毎月のように更新・強化されており、使用方法も微妙に変化して来ていますので、今回、改めて基本的な使用方法をまとめてみました。 本記事は、VS Codeがインストールされており、下記のコマンドで、起動できるようになっている事を前提に始めます。 $ code . もし、まだ、インストールされていない場合は、下記をご参照ください。 Setting up Visual Studio Code また、Node.jsについてもインストールが完了しているものとします。 $ node -v v5.9.0 2 簡単なサーバープログラムの作成 (1) プロジェクトの作成 プロジェクト名をSampleAppと
nodeを使ったソフトウェア、開発案件が増えてきています。そして開発を効率的に行うために必要なのがデバッグツールです。皆さんは何を使っているでしょう。 今回紹介するのはChrome/Chromiumで使われているDevToolsを使ってnodeアプリをデバッグできるdevtoolです。 devtoolの使い方 devtoolのインストールはnpmを使って行います。 npm install devtool -g 後はdevtoolコマンドを叩くとコンソールがnodeのインタプリタになります。requireも使えます。 ソースなどのタブも利用できます。 もちろんブレークポイントも使えます。 使い方としては以下のようにスクリプトを渡したり、標準入力を渡す、Browserifyなどと組み合わせることもできます。 # run a Node script devtool app.js # pipe i
Check how many watchers are active in an angular app Angular watchers is the ultimate AngularJS tool which tells you how many active watchers you currently have. It automatically updates so you can see live how many watcher a page have. This is perfect to increase performance and debugging as well. Features: * Total number of watcher on the current page * Difference from the last total number of w
インターネット上のサイト等,様々なWebサイトにJavaScriptを埋める方法.テストとか,お遊び向け. Fiddlerを使えばWebページのレスポンスにいろいろできるけど,書き換えるには設定ファイルに手を加える必要がある模様. FiddlerScriptと呼ばれるものをを使えばいいっぽい. FiddlerScriptは,JavaScriptに似た,JScriptという言語らしい. 編集方法 Fiddlerにて,メニューバー「Rules」→「Customize Rules..」を選択 メモ帳で対象ファイルが開く. ファイルのありかは,C:\Users\ユーザ名\Documents\Fiddler2\Scripts\CustomRules.js エディタの変更は,メニューバー「Tools」→「Fiddler Options」→「Tools」 専用のFiddler2 ScriptEditor
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く